(mode)
| 4 | describe('issue #382'); |
| 5 | |
| 6 | function testModKernel(mode) { |
| 7 | const gpu = new GPU({ mode: mode }); |
| 8 | const conflictingName = 0.4; |
| 9 | const kernel = gpu.createKernel(function(a, conflictingName) { |
| 10 | return a[this.thread.x] + this.constants.conflictingName + conflictingName; |
| 11 | }) |
| 12 | .setOutput([1]) |
| 13 | .setConstants({ |
| 14 | conflictingName: conflictingName |
| 15 | }); |
| 16 | |
| 17 | const result = kernel([1], 0.6); |
| 18 | |
| 19 | assert.equal(result[0], 2); |
| 20 | gpu.destroy(); |
| 21 | } |
| 22 | |
| 23 | (GPU.isWebGLSupported ? test : skip)('Issue #382 - bad constant webgl', () => { |
| 24 | testModKernel('webgl'); |
no test coverage detected
searching dependent graphs…