[Migrated] Emulate Image/Sampler API operations on non-SPIRV platforms
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.4k
- Fork
- 126
- 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/1065
Old labels: t: enhancement
Originally creatd by Keavon on 2023-05-26T16:12:52Z 👍: 4 ❤️: 2
While the GPU provides hardware for texture sampling and interpolation, on other targets (i.e. CPU in general) it's necessary to emulate that. Currently, the Image and Sampler APIs don't provide texture sampling operations when compiling to non-SPIRV targets.
We need this for an issue on Graphite to support image transformation with graceful CPU fallback (even if the performance would be not ideal), since WebGPU is only available on Chromium browsers for now and thus CPU is still an important target. Having this feature be as performant as possible would be eventually nice, but a slower solution would be a reasonable starting point of greater priority to our use case (something is better than nothing, existing is better than fast).
This issue was discussed in the Embark Discord.
Also on Discord before filing this issue, @eddyb summarized some recollection of the potential main three main concerns involved:
how to feed data into the API, how the API stores the data internally, and how the sampling is implemented - with the middle one, with its potential need to add lifetimes, and/or remove Copy & use Arc, being the worst part, since at least unoptimized sampling is mostly "just" looking up 4 texels and interpolating them
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 individuando le API Image e Sampler e i relativi percorsi di compilazione non-SPIR-V. Traccia il modo in cui i dati delle texture vengono forniti e memorizzati, quindi determina il comportamento di campionamento necessario per CPU e per le altre destinazioni non-SPIR-V; il lavoro è completato quando queste API forniscono il campionamento e l’interpolazione delle texture al di fuori di SPIR-V, preservando al contempo il comportamento GPU esistente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- 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