We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version: Deno 1.46.3
in spce , it should be ok to use sharedArrayBuffer in device.queue.writeBuffer.
main.ts:
const worker = new Worker(import.meta.resolve("./worker.ts"), { type: "module", }); worker.postMessage({ buffer: new SharedArrayBuffer(64) });
worker.ts:
const adapter = await navigator.gpu.requestAdapter(); const device = await adapter!.requestDevice(); const gpuBuffer = device.createBuffer({ size: 32, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC, }); self.addEventListener("message", (event) => { const data = (event as any).data; const view = new DataView(data.buffer); device.queue.writeBuffer(gpuBuffer, 0, view, 0, 4); });
run deno run --unstable-webgpu main.ts then get error:
deno run --unstable-webgpu main.ts
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Version: Deno 1.46.3
in spce , it should be ok to use sharedArrayBuffer in device.queue.writeBuffer.
Reproduce
main.ts:
worker.ts:
run
deno run --unstable-webgpu main.ts
then get error:The text was updated successfully, but these errors were encountered: