Description
Compiling certain inputs to SPIRV with the flag -Gis causes a compile error.
Steps to Reproduce
The following link demonstrates a trivial input that has this behaviour.
https://godbolt.org/z/rq6r1j7on
Actual Behavior
https://godbolt.org/z/rq6r1j7on
Compiling with the flags -spirv -Gis causes a compile error with the following output:
fatal error: generated SPIR-V is invalid: ID '8' decorated with NoContraction multiple times is not allowed.
%8 = OpIMul %v2uint %31 %13
note: please file a bug report on https://github.com/Microsoft/DirectXShaderCompiler/issues with source code if possible
https://godbolt.org/z/q9cMnP7jh
Compiling with the flags -Vd on top removes the validation step and doesn't cause the error. However, the generated SPIRV code contains multiple NoContraction instructions:
OpDecorate %9 NoContraction
OpDecorate %9 NoContraction
This corresponds with the error message produced without -Vd.
Environment
- DXC version: dxcompiler.dll: 1.9 - 1.8.2505.1
- Host Operating System: Windows 11 Enterprise version 24H2
Description
Compiling certain inputs to SPIRV with the flag -Gis causes a compile error.
Steps to Reproduce
The following link demonstrates a trivial input that has this behaviour.
https://godbolt.org/z/rq6r1j7on
Actual Behavior
https://godbolt.org/z/rq6r1j7on
https://godbolt.org/z/q9cMnP7jh
Compiling with the flags -Vd on top removes the validation step and doesn't cause the error. However, the generated SPIRV code contains multiple NoContraction instructions:
This corresponds with the error message produced without -Vd.
Environment