(precision, mode)
| 55 | }); |
| 56 | |
| 57 | function copy2DTexture(precision, mode) { |
| 58 | const gpu = new GPU({ mode }); |
| 59 | function makeTexture() { |
| 60 | return (gpu.createKernel(function() { |
| 61 | return this.thread.x + (this.thread.y * this.output.x); |
| 62 | }, { |
| 63 | output: [5, 5], |
| 64 | pipeline: true, |
| 65 | precision |
| 66 | }))(); |
| 67 | } |
| 68 | const texture = makeTexture(); |
| 69 | const clone = texture.clone(); |
| 70 | assert.notEqual(texture, clone); |
| 71 | assert.equal(texture.texture, clone.texture); |
| 72 | assert.deepEqual(texture.toArray(), clone.toArray()); |
| 73 | gpu.destroy(); |
| 74 | } |
| 75 | |
| 76 | test('2D unsigned precision auto', () => { |
| 77 | copy2DTexture('unsigned'); |
no test coverage detected
searching dependent graphs…