[Migrated] Image macro doesn't fully enforce valid use of non-sampled storage images
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
Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/812
Old labels: t: bug,s: blocked
Originally creatd by fu5ha on 2021-11-29T20:17:40Z
Currently, if we create an image type with the image macro as such:
Image!(2D, type=f32, sampled=false),
the image will still be able to be .read/.fetched, and the spirv Image object won't be decorated as NonReadable. However, according to vulkan spec, "If shaderStorageImageReadWithoutFormat is not enabled, any variable created with a "Type" of OpTypeImage that has a "Sampled" operand of 2 and an "Image Format" operand of Unknown must be decorated with NonReadable."
This can be solved for now by just using an explicit format=blah in the Image macro instead of type, but I think we could also handle this/validate it in the macro automatically. I think the best way forward would be:
- Make a
readableflag in the macro which gets auto-disabled under the above conditions, and when disabled, decorates theOpTypeImagewithNonReadableand doesn't allow to do.read/.fetchon the Image. - However, if it is manually enabled, then we do the current behavior, allowing
readetc. (assumingshaderStorageImageReadWithoutFormatis enabled).
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 dalla macro Image e traccia come type, sampled=false e .read/.fetch influenzano l’OpTypeImage generato. Controlla come viene emesso NonReadable e come vengono consentite le operazioni di lettura. Il lavoro è completato quando le immagini di storage non campionate non valide vengono contrassegnate come NonReadable e non possono essere lette a meno che ciò non venga abilitato esplicitamente, verificando il comportamento rispetto alla regola Vulkan descritta nell’issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- compilers
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100