-
Notifications
You must be signed in to change notification settings - Fork 666
Closed
Description
What is wrong?
Kernels that are recompiled that share the same recycled output texture doesn't update correctly.
Where does it happen?
General use, just after recompile and deletion of a texture.
How do we replicate the issue?
const { GPU } = require('./src');
const gpu = new GPU({ mode: 'gpu' });
const kernel = gpu.createKernel(function (value) {
return value[this.thread.x] + 1;
}, { output: [1], pipeline: true, immutable: true });
const result1 = kernel([1]);
console.log(result1.toArray());
const result2 = kernel(result1);
result1.delete();
console.log(result2.toArray());
result2.delete();
const result3 = kernel([3]);
console.log(result3.toArray()); //
const result4 = kernel(result3);
result3.delete();
console.log(result4.toArray());
Outputs:
Float32Array [ 2 ]
Float32Array [ 3 ]
Float32Array [ 3 ]
Float32Array [ 5 ]
How important is this (1-5)?
4
Expected behavior (i.e. solution)
Should output:
Float32Array [ 2 ]
Float32Array [ 3 ]
Float32Array [ 4 ]
Float32Array [ 5 ]
Other Comments
Metadata
Metadata
Assignees
Labels
No labels