diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-13 15:09:31 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-13 15:09:31 +0100 |
| commit | 3c51bb700efcc3d20400fb0d945a9c7567d3bbde (patch) | |
| tree | 869aee7b2e85615fc56209e8cb9821fa446d90ad /tools | |
| parent | 4d1df90124418a57cb9ed62eab25497d53a47c8c (diff) | |
CNN v2 web tool: Fix WebGPU texture synchronization error
Fixed validation error where staticTex was used for both storage write
(in static compute pass) and texture read (in CNN bind group) within
same command encoder. Now uses layerTextures[0] for reading, which is
the copy destination and safe for read-only access.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/cnn_v2_test/index.html | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/cnn_v2_test/index.html b/tools/cnn_v2_test/index.html index e2b0a04..91f7942 100644 --- a/tools/cnn_v2_test/index.html +++ b/tools/cnn_v2_test/index.html @@ -859,7 +859,6 @@ class CNNTester { usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST }); this.device.queue.writeBuffer(weightsGPU, 0, this.weightsBuffer); - const staticPipeline = this.device.createComputePipeline({ layout: 'auto', compute: { module: this.device.createShaderModule({ code: STATIC_SHADER }), entryPoint: 'main' } @@ -935,7 +934,7 @@ class CNNTester { const cnnBG = this.device.createBindGroup({ layout: cnnPipeline.getBindGroupLayout(0), entries: [ - { binding: 0, resource: staticTex.createView() }, + { binding: 0, resource: layerTextures[0].createView() }, { binding: 1, resource: srcTex.createView() }, { binding: 2, resource: dstTex.createView() }, { binding: 3, resource: { buffer: weightsGPU } }, |
