From 1d97380da0dbd0b0559801fcf73a3a50d777b965 Mon Sep 17 00:00:00 2001 From: John Owens Date: Wed, 9 Oct 2024 11:56:11 -0700 Subject: [PATCH] let's get rid of wgSize --- timing-mre.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/timing-mre.html b/timing-mre.html index aeedca1..4080bfa 100644 --- a/timing-mre.html +++ b/timing-mre.html @@ -177,17 +177,16 @@ const memcpyModule = device.createShaderModule({ label: "copy large chunk of memory from memSrc to memDest", code: /* wgsl */ ` - override wgSize: u32 = 1; /* output */ @group(0) @binding(0) var memDest: array; /* input */ @group(0) @binding(1) var memSrc: array; - @compute @workgroup_size(wgSize) fn memcpyKernel( + @compute @workgroup_size(${workgroupSize}) fn memcpyKernel( @builtin(global_invocation_id) id: vec3u, @builtin(num_workgroups) nwg: vec3u, @builtin(workgroup_id) wgid: vec3u) { - let i = id.y * nwg.x * wgSize + id.x; + let i = id.y * nwg.x * ${workgroupSize} + id.x; memDest[i] = memSrc[i] + 1; } `, @@ -198,9 +197,6 @@ layout: "auto", compute: { module: memcpyModule, - constants: { - wgSize: workgroupSize, - }, }, });