HGI Vulkan Shader Compilation: Ability to target a higher version of SPIR-V

Hello Hydra team!

I’ve been working on a Render Delegate and have been taking advantage of the HGI + glslfx ecosystem which has working smoothly for the most part, so thanks for putting those exposures together!

We have a compute shader which can benefit from using the Vulkan Subgroups feature set however the SPIR-V version target in the hgiVulkan shader compiler seems to be hard-coded to 1.0 (Subgroups require a minimum of 1.3). Is there a possibility of exposing a way to configure that at the API or environment level? For now we’ve opt’ed to use emulated versions of subgroups in the shader but would love to see the ability to have more optimal target specific flexibility :slight_smile:

Richard

That’s a good catch, Richard!

Since Vulkan 1.3.x has been our specified baseline Vulkan version for a while now, we can definitely increase the SPIR-V target version.

We just merged a change internally to bump up the SPIR-V target version to 1.6 and the Vulkan env version to 1.3 and this change will land in the dev branch after the 25.11 release is out.

Longer term, it is interesting to consider how we might expose a way to affect this and other shader compilation options.

Thanks!
-David

1 Like

Got it - thanks for the update @davidgyu! Looking forward to the drop :slight_smile: