Description
While trying to compile my shader for SPIR-V I get an error regarding two OpTypeStruct that don't match. I get it when trying to assigning a ConstantBuffer to a T in the shader. See Godbolt link for more details.
Steps to Reproduce
See Godbolt link: https://godbolt.org/z/vT9jzazfr
It seems related to the fact there is a nested struct inside another struct used in a ConstantBuffer. They are then incompatible.
Actual Behavior
fatal error: generated SPIR-V is invalid: Result type (OpTypeStruct) does not match the type that results from indexing into the composite (OpTypeStruct).
%33 = OpCompositeExtract %DirectionalLight_0 %32 0
Environment
- DXC version 1.8.2505 (Godbolt link), also on 1.9.2602
- Host Operating System: Windows 11 25H2
Description
While trying to compile my shader for SPIR-V I get an error regarding two OpTypeStruct that don't match. I get it when trying to assigning a ConstantBuffer to a T in the shader. See Godbolt link for more details.
Steps to Reproduce
See Godbolt link: https://godbolt.org/z/vT9jzazfr
It seems related to the fact there is a nested struct inside another struct used in a ConstantBuffer. They are then incompatible.
Actual Behavior
Environment