[SPIR-V] GetVertexAttribute with -pack-optmized does not generate good type
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- cpp
- Área
- compilers, computer-graphics
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C++
- Estrellas
- 3.7k
- Forks
- 926
- Merge medio
- 3 d 22 h
- PR fusionados (30 d)
- 45
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/DirectXShaderCompiler
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/DirectXShaderCompiler#9173 ·
Los mantenedores suelen responder en 2 días
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
microsoft/DirectXShaderCompiler#9155 · 4 comentarios ·
Los mantenedores suelen responder en 2 días
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/DirectXShaderCompiler#9135 ·
Los mantenedores suelen responder en 2 días
-
DXC emits DW_LANG_C_plus_plus instead of DW_LANG_HLSL for HLSLPosiblemente ocupada @rj123-nv la tomó hace 18 días. Abiertobug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
microsoft/DirectXShaderCompiler#9087 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
microsoft/DirectXShaderCompiler#9086 ·
Los mantenedores suelen responder en 2 días
Todos los issues de microsoft/DirectXShaderCompiler
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
feature:config kind:docs os:windows toolchain:cmake triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
arch-based bug niri
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
noctalia-dev/noctalia#5552 ·
Los mantenedores suelen responder en 1 día