From d12bd2d8b0423eb878d480b5fc325fa2ddcc8e20 Mon Sep 17 00:00:00 2001 From: John Owens Date: Wed, 6 Nov 2024 14:50:32 -0800 Subject: [PATCH] fixing some timestamp write setup --- node-deno-timing-mre.mjs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/node-deno-timing-mre.mjs b/node-deno-timing-mre.mjs index 502539a..e1bd9b5 100644 --- a/node-deno-timing-mre.mjs +++ b/node-deno-timing-mre.mjs @@ -100,7 +100,7 @@ async function main(navigator) { }); const timestampWrites = { - querySet, + querySet: querySet, beginningOfPassWriteIndex: 0, // Write timestamp in index 0 when pass begins. endOfPassWriteIndex: 1, // Write timestamp in index 1 when pass ends. }; @@ -119,15 +119,17 @@ async function main(navigator) { usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ, }); - const memcpyPass = encoder.beginComputePass(timestampWrites); - const oldMemcpyPassDescriptor = { + const memcpyPassDescriptor = { label: "memcpy compute pass", timestampWrites: { - querySet, + querySet: querySet, beginningOfPassWriteIndex: 0, endOfPassWriteIndex: 1, }, }; + const memcpyPass = encoder.beginComputePass({ + timestampWrites: timestampWrites, + }); // memcpyPassDescriptor); //timestampWrites); memcpyPass.setPipeline(memcpyPipeline); memcpyPass.setBindGroup(0, memcpyBindGroup);