MCPcopy Index your code
hub / github.com/gpujs/gpu.js / copy3DTexture

Function copy3DTexture

test/features/clone-textures.js:108–125  ·  view source on GitHub ↗
(precision, mode)

Source from the content-addressed store, hash-verified

106});
107
108function 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
127test('3D unsigned precision auto', () => {
128 copy3DTexture('unsigned');

Callers 1

clone-textures.jsFile · 0.85

Calls 4

destroyMethod · 0.95
makeTextureFunction · 0.70
cloneMethod · 0.45
toArrayMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…