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

Offen
#8,941 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
cpp
Bereich
compilers

Rechercherichtung

Start with the linked Godbolt reproducer and inspect the generated SPIR-V around the reported dominance validation error. Compare compilation with the branch layouts and resource types described in the issue; done means the ROV read case produces valid SPIR-V without regressing the working DXIL, RWTexture2D, or else-branch cases.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug needs-triage spirv

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.

Vorherrschende Sprache
C++
Sterne
3.7k
Forks
926
Ø Merge
3 T. 22 Std.
Gemergte PRs (30 T.)
45

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/DirectXShaderCompiler

Alle Issues in microsoft/DirectXShaderCompiler

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.