destructurizing structs containing opaque types
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.4k
- Fork
- 125
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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...
Guida per i contributori
Apri 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.
Direzione di ricerca
Inizia tracciando la gestione esistente che inserisce inline i metodi che fanno riferimento a tipi opachi, quindi esamina la struttura SPIR-V generata mostrata nel report e il fallimento di spirv-val. Il lavoro sarà completato quando saranno consentite strutture contenenti tipi opachi, inclusi sampler personalizzati, senza dover passare l’immagine a ogni chiamata di campionamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- compilers, computer-graphics
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100