gpu.js
gpu.js copied to clipboard
Returning array broken with mode:dev

What is wrong?
Returning an array from a kernel returns data full of NaN instead of the expected values.
Where does it happen?
When the GPU is created with {mode: "dev"} and the kernel code returns an array (e.g. return [1,2,3] instead of a single value return 2)
How do we replicate the issue?
run the tests in return-arrays.js with mode modified to be 'dev'.
Alternatively, see codepen here: https://codepen.io/rotu-the-bold/pen/LYLwBqy
How important is this (1-5)?
3
Expected behavior (i.e. solution)
In dev mode, the kernel should return the same value as in GPU mode.