Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-78583

Conclude the story for geometry and tessellation shader support in the shader stack

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • 6.0
    • None
    • Qt RHI
    • None

    Description

      Check level of geometry and tessellation shader support in the SPIRV-Cross and the compiler. (was not fully in place some time ago, maybe things have improved) Have a plan for cases when such shaders are (or are perceived to be) important.

      Could be that adding support in the shader stack (Qt Shader Tools) is the right choice, assuming the 3rd party tools can handle this for all targets (GLSL, HLSL, MSL).

      If this happens, ensure there are proper amount of doc warnings in place (since these are not what one should use on typical mobile and embedded platforms due to performance reasons, unless we want to push users to shoot themselves into the foot)

      May be relevant to the 3D tooling on desktop since some of the machinery inherited from Qt 3D Studio relies on such shaders for some minor features in the editor.

       

      Status 19/10/2019:

      Geometry shaders is a no-go. We should embrace compute shaders instead. (which are fully supported)

      1. There is no geometry shader support on Metal.
      2. May not be supported for HLSL by SPIRV-Cross. (see https://www.khronos.org/assets/uploads/developers/library/2019-vulkanised/04-SPIRV-Cross-May19.pdf#page=19 )
      3. Geometry shaders are to be avoided on mobile/embedded GPUs. (e.g. ARM Mali: https://static.docs.arm.com/100019/0100/arm_mali_application_developer_best_practices_developer_guide_100019_0100_00_en2.pdf#page=19  )
      4. Geometry and tessellation stages (unlike vertex, fragment, and compute) are in fact optional in the Vulkan spec. Technically we cannot assume that a random Vulkan implementation will support geometry and tessellation shaders.

      Tessellation is likely a no-go. Perhaps investigate this a bit more.

      1. See https://www.khronos.org/assets/uploads/developers/library/2019-vulkanised/04-SPIRV-Cross-May19.pdf#page=19 and https://www.khronos.org/assets/uploads/developers/library/2019-vulkanised/04-SPIRV-Cross-May19.pdf#page=22
      2. Note that the model is somewhat different between Metal and D3D/Vulkan/GL. A common API on top is therefore not trivial. See e.g. https://github.com/gpuweb/gpuweb/issues/445
      3. https://static.docs.arm.com/100019/0100/arm_mali_application_developer_best_practices_developer_guide_100019_0100_00_en2.pdf#page=18

        

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            lagocs Laszlo Agocs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes