From 80d75a9a3a282447dee39e058122332d6af20824 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Thu, 5 Dec 2024 19:36:09 +0900 Subject: [PATCH] Fix texture builtin weight reading The code was using the wrong size for compute stages. --- .../shader/execution/expression/call/builtin/texture_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts b/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts index 2e4123c6cfeb..ba8a58ae861c 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts @@ -522,7 +522,7 @@ export async function queryMipLevelMixWeightsForDevice(t: GPUTest, stage: Shader pass.setBindGroup(0, createBindGroup(pipeline)); pass.dispatchWorkgroups(kMipLevelWeightSteps + 1); pass.end(); - encoder.copyBufferToBuffer(storageBuffer, 0, resultBuffer, 0, resultBuffer.size); + encoder.copyBufferToBuffer(storageBuffer, 0, resultBuffer, 0, storageBuffer.size); break; } case 'fragment': {