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)
- There is no geometry shader support on Metal.
- 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 )
- 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 )
- 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.
- 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
- 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
- https://static.docs.arm.com/100019/0100/arm_mali_application_developer_best_practices_developer_guide_100019_0100_00_en2.pdf#page=18