Arrays in parameters and returnTypes for kernel's subfunctions - can be bigger than 4?
- Lingua principale
- JavaScript
- Stelle
- 15.5k
- Fork
- 663
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
This issue is connected with #385 and #377 . Currently we are able to declare param/return value as Array(2), Array(3) and Array(4). But wen we use type `Array` or `Array(5)` (and greater than 5) then we will see error. It is possible to use a little bigger arrays (with 5-16 elements, or even arbitrary size)?
Here is fiddle-test-case:
https://jsfiddle.net/u9y8xw3n/1/
So when we use arbitrary array:
`gpu.addFunction(bug2Fn, { paramTypes: { v: 'Array'}, returnType: 'Array' }); `
or
`gpu.addFunction(bug2Fn, { paramTypes: { v: 'Array(2)'}, returnType: 'Array' }); `
We get:
> An error occurred compiling the shaders: ERROR: 0:160: 'sampler2D' : sampler2Ds can't be function return values gpu.js:3642
For
`gpu.addFunction(bug2Fn, { paramTypes: { v: 'Array'}, returnType: 'Array(3)' }); `
we get:
> An error occurred compiling the shaders: ERROR: 0:161: 'user_vSize' : undeclared identifier gpu.js:3642
For:
`gpu.addFunction(bug1Fn, { paramTypes: { v: 'Array(2)'}, returnType: 'Array(5)' }); `
We get:
> Uncaught Error: type Array(5) not handled gpu.js:2949
For
`gpu.addFunction(bug3Fn, { paramTypes: { v: 'Array(5)'}, returnType: 'Array(3)' }); `
we get:
> Uncaught Error: unknown type Array(5), gpu.js: 2554
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con il JSFiddle collegato e gli esempi di gpu.addFunction, quindi leggi le issue correlate #385 e #377. Traccia la gestione attuale delle dichiarazioni dei parametri Array e di returnType rispetto agli errori shader e unknown-type segnalati. Il lavoro è completo quando i casi di array di dimensioni maggiori o arbitrarie supportati vengono compilati e restituiscono risultati corretti, e quando è definito l'intervallo di dimensioni supportato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- 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