You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SPIR-V] SV_CullPrimitive as a pixel shader input produces invalid SPIR-V #9084
DXIL accepts SV_CullPrimitive as a pixel shader input of any type and replaces it with a constant 0 (HLSignatureLower.cpp). The SPIR-V backend maps it to the CullPrimitiveEXT builtin instead, which needs MeshShadingEXT and isn't allowed in fragment shaders (VUID 07034), so the output is invalid:
float4main(bool c : SV_CullPrimitive) : SV_Target { return c; }
dxc -T ps_6_5 -E main -spirv:
fatal error: generated SPIR-V is invalid: Operand 3 of Decorate requires one of these capabilities: MeshShadingEXT
Same with uint. DXIL compiles both.
The plan from the discussion is to mirror DXIL and replace the input with false. Thanks Jonathan Zakharov (@jzakharovnv) for tracking down how DXIL handles this. Happy to take this one if that helps :)
Thanks for filing this. If you have any interest in implementing a fix, be our opensource guest and feel free to do so. Otherwise, I don't think this is too burning an issue any DXC users are running into and thus will likely be on maintainers' backburner for a while. If you do want to make a PR though, ping me and I'll be able to review it quicker, since context is fresh.
Activity
jzakharovnv commentedon Oct 30, 2026
Thanks for filing this. If you have any interest in implementing a fix, be our opensource guest and feel free to do so. Otherwise, I don't think this is too burning an issue any DXC users are running into and thus will likely be on maintainers' backburner for a while. If you do want to make a PR though, ping me and I'll be able to review it quicker, since context is fresh.
[SPIR-V] Replace pixel shader SV_CullPrimitive inputs with 0 (microso…