destructurizing structs containing opaque types
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 3.4k
- Forks
- 126
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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...
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die bestehende Behandlung nachzuverfolgen, die Methoden inline einfügt, die auf opake Typen verweisen; untersuche dann die im Bericht gezeigte generierte SPIR-V-Struktur und den Fehler von spirv-val. Als abgeschlossen gilt die Änderung, wenn Strukturen mit opaken Typen, einschließlich benutzerdefinierter Sampler, möglich sind, ohne dass das Image an jeden Sampling-Aufruf übergeben werden muss.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- compilers, computer-graphics
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100