]> zoso.dev Git - libnemo.git/commitdiff
Extend dispatch dimensions. Tweak commenting.
authorChris Duncan <chris@zoso.dev>
Thu, 2 Jan 2025 21:49:25 +0000 (13:49 -0800)
committerChris Duncan <chris@zoso.dev>
Thu, 2 Jan 2025 21:49:25 +0000 (13:49 -0800)
src/lib/workers/powgpu.ts

index 04ba86c686f700b025902ba3649d621d55c81c45..8b45215b924e8f7b71c63d7e0a8e0c472aad2ac8 100644 (file)
@@ -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