From 80362539153d9b7a2517a555305758e720e95e1f Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 2 Jan 2025 13:49:25 -0800 Subject: [PATCH] Extend dispatch dimensions. Tweak commenting. --- src/lib/workers/powgpu.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/workers/powgpu.ts b/src/lib/workers/powgpu.ts index 04ba86c..8b45215 100644 --- a/src/lib/workers/powgpu.ts +++ b/src/lib/workers/powgpu.ts @@ -327,14 +327,14 @@ export class PowGpu extends WorkerInterface { ], }) - // Create command encoder to issue commands to GPU and initiate render pass + // Create command encoder to issue commands to GPU and initiate computation const commandEncoder = PowGpu.#device.createCommandEncoder() const passEncoder = commandEncoder.beginComputePass() - // Issue commands and end render pass + // Issue commands and end compute pass structure passEncoder.setPipeline(PowGpu.#pipeline) passEncoder.setBindGroup(0, bindGroup) - passEncoder.dispatchWorkgroups(256) + passEncoder.dispatchWorkgroups(256, 256, 256) passEncoder.end() // Copy 8-byte nonce and 4-byte found flag from GPU to CPU for reading @@ -346,7 +346,7 @@ export class PowGpu extends WorkerInterface { 12 ) - // End frame by passing array of command buffers to command queue for execution + // End computation by passing array of command buffers to command queue for execution PowGpu.#device.queue.submit([commandEncoder.finish()]) // Read results back to Javascript and then unmap buffer after reading -- 2.34.1