From 4affbefcfc2c063c7ca71b4b0b18aa23dcfb937f Mon Sep 17 00:00:00 2001 From: Greggman Date: Thu, 5 Dec 2024 02:43:12 -0800 Subject: [PATCH] Fix texture builtin weight reading (#4078) 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': {