Skip to content

[SPIR-V] SPIR-V not valid when ROV is used with branch if. #8941

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashneeds-triageAwaiting triagespirvWork related to SPIR-V

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions