Title
[SPIR-V] Reapeated SV_DomainLocation semantics don't produce an error and can crash the compiler (works with the DXIL backend)
Functional impact
Declaring repeated SV_DomainLocation input semantics in the same Domain shader entry point does not produce a compiler error and crashes in some cases.
Minimal repro steps
- Compile the following shader with
dxc.exe -T ds_6_0 -E Domain -spirv repro_shader.txt
repro_shader.txt
Expected result
The SPIR-V backend should produce error similar to that of the DXIL backend:
float4 Domain (const OutputPatch<HullOut,3> vi,
^
repro_shader.txt:4:1: error: Parameter with semantic SV_DomainLocation has overlapping semantic index at 0
Actual result
The SPIR-V backend crashes with an access violation exception:
Internal compiler error: access violation. Attempted to read from address 0x0000000000000010
Further technical details
The repro_shader.txt in the Minimal repro steps section crashes the compiler with 3 repeats, if repeating only twice it still compiles, which is still an issue as it should instead produce a compiler error (like the DXIL backend does)
Used DXC release v1.6.2104 (e09a454)