[SPIR-V] GetVertexAttribute with -pack-optmized does not generate good type
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- compilers, computer-graphics
Direzione di ricerca
Start with the Godbolt reproduction and compare the generated SPIR-V with and without --pack-optimized, focusing on the type of %in_var_GPUSCENE_VERTEXTOTRIBITMASKS. Trace the type from the SPIR-V emitVisitor into the optimization pass suspected in the report; done means the optimized output uses the expected array type and passes SPIR-V validation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi everyone, me again 😄
Description
Our shaders does not compile well with --pack-optimized. I don't know if it supposed to work or if it is a bug.
I had different errors. The reproduction on godbolt is this one PerVertexKHR must be declared as arrays. I also had validation errors on CompositeExtract : generated SPIR-V is invalid: Result type (OpTypeVector) does not match the type that results from indexing into the composite (OpTypeInt)
The issue is that my non interpolated variable fetched with GetVertexAtAttribute has a type OpTypePointer->OpTypeVector OpTypeInteger 4 but it should be OpTypePointer-> OptypeArray (OpTypeVector OpTypeInteger 4) 3. I tried to step into dxc but the type was good in the spirv emitVisitor so I suspect an optimization pass but I did not dive more :/
Without validation it is easy to see the difference between with and without --pack-optimized.
Steps to Reproduce
https://godbolt.org/z/nx5ozWrfW
It does not compile. Check with -Vd to see the actual type of %in_var_GPUSCENE_VERTEXTOTRIBITMASKS that is %_ptr_Input_v4uint and not %_ptr_Input__arr_v4uint_uint_3 if --pack-optimized is not used.
Actual Behavior
fatal error: generated SPIR-V is invalid: [VUID-StandaloneSpirv-Input-06778] PerVertexKHR must be declared as arrays
%in_var_GPUSCENE_VERTEXTOTRIBITMASKS = OpVariable %_ptr_Input_v4uint Input
Compiler returned: 5
Environment
DXC trunk on godbolt
Reproduce also on windows 11 and custom fork of 1.10.2605.24.
As usual, if I did not understand something, please tell me :)
Have a wonderful day.
Cheers,
Robin.
- Lingua principale
- C++
- Stelle
- 3.7k
- Fork
- 926
- Merge medio
- 3g 22h
- PR unite (30g)
- 45
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/DirectXShaderCompiler
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/DirectXShaderCompiler#9173 ·
I maintainer di solito rispondono entro 2 giorni
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
microsoft/DirectXShaderCompiler#9155 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/DirectXShaderCompiler#9135 ·
I maintainer di solito rispondono entro 2 giorni
-
DXC emits DW_LANG_C_plus_plus instead of DW_LANG_HLSL for HLSLForse già presa @rj123-nv l’ha presa 18 giorni fa. Apertabug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
microsoft/DirectXShaderCompiler#9087 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
microsoft/DirectXShaderCompiler#9086 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di microsoft/DirectXShaderCompiler
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
feature:config kind:docs os:windows toolchain:cmake triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
arch-based bug niri
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
noctalia-dev/noctalia#5552 ·
I maintainer di solito rispondono entro 1 giorno