qt5base-lts/tests
Laszlo Agocs a325016aa9 rhi: Add the basic infrastructure for tessellation support
...but this will only be supported with Vulkan and OpenGL 4.0+ and
OpenGL ES 3.2+ for the time being.

Taking the Vulkan model as our standard, the situation is the
following:

- Vulkan is ok, qsb secretly accepts .tesc and .tese files as input
  already (plus QShader already has the necessary plumbing when it
  comes to enums and such) To switch the tessellation domain origin to
  bottom left we require Vulkan 1.1 (don't bother with
  VK_KHR_maintenance2 on top of 1.0 at this point since 1.1 or 1.2
  implementations should be common by now). The change is essential to
  allow the same evaluation shader to work with both OpenGL and
  Vulkan: this way we can use the same shader source, declaring the
  tessellation winding order as CCW, with both APIs.

- OpenGL 4.0 and OpenGL ES 3.2 (or ES 3.1 with the Android extension
  pack, but we won't bother with checking that for now) can be made
  working without much complications, though we need to be careful
  when it comes to gathering and setting uniforms so that we do not
  leave the new tessellation stages out. We will stick to the Vulkan
  model in the sense that the inner and outer tessellation levels must
  be specified from the control shader, and cannot be specified from
  the host side, even though OpenGL would allow this. (basically the
  same story as with point size in vertex shaders)

- D3D11 would be no problem API-wise, and we could likely implement
  the support for hull and domain shader stages in the backend, but
  SPIRV-Cross does not support translating tessellation shaders to
  HLSL.  Attempting to feed in a .tesc or .tese file to qsb with
  --hlsl specified will always fail. One issue here is how hull
  shaders are structured, with the patchconstantfunc attribute
  specifying a separate function computing the patch constant
  data. With GLSL there is a single entry point in the tessellation
  control shader, which then performs both the calculations on the
  control points as well as the constant data (such as, the inner and
  outer tessellation factors).  One option here is to inject
  handwritten HLSL shaders in the .qsb files using qsb's replace (-r)
  mode, but this is not exactly a viable universal solution.

- Metal uses a different tessellation pipeline involving compute
  shaders. This needs more investigation but probably not something we
  can prioritize in practice. SPIRV-Cross does support this,
  generating a compute shader for control and a (post-)vertex shader
  for evaluation, presumably in order to enable MoltenVK to function
  when it comes to tessellation, but it is not clear yet how usable
  this is for us.

Change-Id: Ic953c63850bda5bc912c7ac354425041b43157ef
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-01-13 13:44:29 +01:00
..
auto tst_QString/tst_QByteArray: add checks for null-ness 2022-01-13 01:09:08 +01:00
baseline Remove faulty #include from widgets baseline test 2022-01-04 05:53:30 +01:00
benchmarks Fix the benchmark for QList::removeAll() 2021-12-09 03:45:08 +01:00
global
libfuzzer Fuzzing: Don't explicitly restrict sizes before loading images 2022-01-12 22:10:01 +00:00
manual rhi: Add the basic infrastructure for tessellation support 2022-01-13 13:44:29 +01:00
shared QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
testserver Network self-test: make it work with docker/containers 2020-11-17 19:56:06 +01:00
CMakeLists.txt CMake: Refactor optimization flag handling and add optimize_full 2020-10-06 10:07:05 +02:00
README

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.