(mode)
| 4 | describe('issue #378'); |
| 5 | |
| 6 | function testOnlyFirstIterationSafari(mode) { |
| 7 | const gpu = new GPU({ mode: mode }); |
| 8 | const conflictingName = 0.4; |
| 9 | const kernel = gpu.createKernel(function(iter) { |
| 10 | let sum = 0; |
| 11 | for(let i=2; i<iter; i++) { |
| 12 | sum = sum + i; |
| 13 | } |
| 14 | return 2*sum ; //+ this.thread.x; |
| 15 | }) |
| 16 | .setOutput([10]) |
| 17 | .setConstants({ |
| 18 | conflictingName: conflictingName |
| 19 | }); |
| 20 | |
| 21 | const result = kernel(5); |
| 22 | |
| 23 | assert.deepEqual(Array.from(result), [18,18,18,18,18,18,18,18,18,18]); |
| 24 | gpu.destroy(); |
| 25 | } |
| 26 | |
| 27 | (GPU.isWebGLSupported ? test : skip)('Issue #378 - only first iteration safari webgl', () => { |
| 28 | testOnlyFirstIterationSafari('webgl'); |
no test coverage detected
searching dependent graphs…