Hi everyone!
Description
DXC generates invalid SPIR-V with error generated SPIR-V is invalid: ID '47[%47]' defined in block '39[%39]' does not dominate its use in block '38[%38]' if a read of a ROV is attempted inside a if branch.
Steps to Reproduce
https://godbolt.org/z/MGME6Wc97
Actual Behavior
DXC returns generated SPIR-V is invalid: ID '47[%47]' defined in block '39[%39]'. It compiles with DXIL. It compiles with RWTexture2D instead of ROVTexture2D. It compiles if the ROV is read in the else branch of the doSSR.
Environment
DXC trunk on godbolt.
Reproduce also on windows 11 and custom fork of 1.10.2605.24.
If this shader is invalid and I misunderstood something, I'm sorry but I will be eager for the explanation :D
Have a nice day,
Robin.
Hi everyone!
Description
DXC generates invalid SPIR-V with error
generated SPIR-V is invalid: ID '47[%47]' defined in block '39[%39]' does not dominate its use in block '38[%38]'if a read of a ROV is attempted inside a if branch.Steps to Reproduce
https://godbolt.org/z/MGME6Wc97
Actual Behavior
DXC returns
generated SPIR-V is invalid: ID '47[%47]' defined in block '39[%39]'. It compiles with DXIL. It compiles with RWTexture2D instead of ROVTexture2D. It compiles if the ROV is read in the else branch of thedoSSR.Environment
DXC trunk on godbolt.
Reproduce also on windows 11 and custom fork of 1.10.2605.24.
If this shader is invalid and I misunderstood something, I'm sorry but I will be eager for the explanation :D
Have a nice day,
Robin.