(precision, mode)
| 106 | }); |
| 107 | |
| 108 | function copy3DTexture(precision, mode) { |
| 109 | const gpu = new GPU({ mode }); |
| 110 | function makeTexture() { |
| 111 | return (gpu.createKernel(function() { |
| 112 | return this.thread.x + (this.thread.y * this.output.x) * (this.output.x * this.output.y * this.thread.z); |
| 113 | }, { |
| 114 | output: [5, 5, 5], |
| 115 | pipeline: true, |
| 116 | precision |
| 117 | }))(); |
| 118 | } |
| 119 | const texture = makeTexture(); |
| 120 | const clone = texture.clone(); |
| 121 | assert.notEqual(texture, clone); |
| 122 | assert.equal(texture.texture, clone.texture); |
| 123 | assert.deepEqual(texture.toArray(), clone.toArray()); |
| 124 | gpu.destroy(); |
| 125 | } |
| 126 | |
| 127 | test('3D unsigned precision auto', () => { |
| 128 | copy3DTexture('unsigned'); |
no test coverage detected
searching dependent graphs…