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, - }, }, });