feat: Allow overrides as the length of workgroup arrays
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- computer-graphics
Direzione di ricerca
Start by tracing d.arrayOf and tgpu.workgroupVar, then inspect how overrides are represented and how array lengths flow into sizeOf and buffer reads or writes. Done means workgroup arrays can use an override length, invalid address spaces and CPU-side operations produce clear errors, and the TypeScript type is defined.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follow-up to #3131.
Problem
WGSL allows an override as the length of an array in the workgroup address space:
override tileSize: u32 = 64;
var<workgroup> tile: array<f32, tileSize>;
In TypeGPU, d.arrayOf(schema, length) only accepts a number, so the length of a workgroup array can't depend on an override.
Proposal
Let array schemas take an override as their length:
const tileSize = tgpu['~unstable'].override(d.u32, 64);
const tile = tgpu.workgroupVar(d.arrayOf(d.f32, tileSize));
Things to figure out
- WGSL only allows these arrays in the
workgroupaddress space. Using one anywhere else (buffers, private variables, function variables, etc.) should give a clear error. - CPU-side code that depends on the array length (
sizeOf, reading and writing buffers, etc.) can't know it. These arrays should be rejected there. - How the type of such an array looks on the TypeScript side.
- Lingua principale
- TypeScript
- Stelle
- 3.3k
- Fork
- 135
- Merge medio
- 4g 1h
- PR unite (30g)
- 64
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi 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.
Altre issue di software-mansion/TypeGPU
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
software-mansion/TypeGPU#3219 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
texture.write(VideoFrame) uses the padded coded size instead of the visible sizeForse già presa @RaphaelFakhri l’ha presa 1 giorno fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
software-mansion/TypeGPU#3213 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
software-mansion/TypeGPU#3008 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
software-mansion/TypeGPU#2948 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
docs: Fix camera orientation in "Monocular Light Injection" exampleForse già presa @pullfrog l’ha presa 62 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
software-mansion/TypeGPU#2890 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di software-mansion/TypeGPU
Issue simili
-
bug P3 UI/UX
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
StellarState/SS-backend#712 ·
I maintainer di solito rispondono entro 1 giorno
-
area: backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
snapotter-hq/SnapOtter#3473 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
gitroomhq/postiz-app#2304 ·
I maintainer di solito rispondono entro 1 giorno
-
harlan-agent-ready-to-implement routine:ci-review
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
harlan-zw/unlighthouse#454 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno