PowGpu.#device.queue.submit([commandEncoder.finish()])
// Read results back to Javascript and then unmap buffer after reading
- const start = performance.now()
await PowGpu.#cpuBuffer.mapAsync(GPUMapMode.READ)
await PowGpu.#device.queue.onSubmittedWorkDone()
- console.log(`mapAsync and onSubmittedWorkDone (${performance.now() - start} ms)`)
const data = new DataView(PowGpu.#cpuBuffer.getMappedRange())
const nonce = data.getBigUint64(0, true)
const found = !!data.getUint32(8)