From 3c51bb700efcc3d20400fb0d945a9c7567d3bbde Mon Sep 17 00:00:00 2001 From: skal Date: Fri, 13 Feb 2026 15:09:31 +0100 Subject: 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 --- tools/cnn_v2_test/index.html | 3 +-- 1 file changed, 1 insertion(+), 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 } }, -- cgit v1.2.3