destructurizing structs containing opaque types
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Rust
- Estrellas
- 3.4k
- Forks
- 126
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I'd love to be able to pack opaque types like depth into structs, but whenever I do, this happens:
error: error:0:0 - [VUID-StandaloneSpirv-None-04667] In Vulkan, OpTypeStruct must not contain an opaque type.
%material__screen_space_shadows__directional__SSSDirectionalLight____ = OpTypeStruct %renderer__camera__Camera %v3float %v2uint %v2uint %uint %uint %float %_ptr_UniformConstant_192
|
= note: spirv-val failed
I know you're already inlining all methods that reference opaque types, as one cannot simply pass an opaque type to a function in glsl. Could we also get that for structs?
Example use-case: Custom Samplers (or buffer loaders). Right now you are forced to pass the image to sample from to every single sample call, as you can't store the image in the custom sampler's struct. Often when constructing your sampler you want to pass in the image anyway, to load some metadata about it (eg. size) that will be constant throughout all sampling operations. And let's just hope noone accidentally passes in a different image for sampling than the one used to construct the sampler...
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.
Línea de trabajo
Empieza rastreando el manejo existente que inserta inline los métodos que hacen referencia a tipos opacos; después, inspecciona la estructura SPIR-V generada que se muestra en el informe y el fallo de spirv-val. El trabajo estará terminado cuando se permitan estructuras que contengan tipos opacos, incluidos samplers personalizados, sin tener que pasar la imagen a cada llamada de muestreo.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- compilers, computer-graphics
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100