KhronosGroup / SPIRV-Cross

SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
Apache License 2.0
2.02k stars 558 forks source link

GLSL: Support `GL_KHR_shader_subgroup_arithmetic` #1479

Open devshgraphicsprogramming opened 3 years ago

devshgraphicsprogramming commented 3 years ago

Similar to #1350, #1351 and #1352

TODO: Issue Description and implementation plan.

I can assign myself / my company.

FunMiles commented 2 years ago

Is there any progress on this? What is the actual status? Trying to look through some of the other issues mentioned, it seems that some of it should be working but not all? Such operations are extremely important tools for efficient Vulkan Compute shaders.

In MoltenVK I got an error with glslang not accepting arithmetic operations ('subgroup op' : requires SPIR-V 1.3). Is this relevant here or a totally different issue?

HansKristian-Work commented 2 years ago

This is for desktop GL fallback paths. Vulkan GLSL and Metal paths should work fine.

FunMiles commented 2 years ago

@HansKristian-Work thanks for the quick reply. As it turns out, I just had to set a flag on glslangValidator and it worked. The code runs correctly, so the translation SPIR-V to MSL must have worked.