Skip to content
New issue

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

Cannot use atomicStore with atomicLoad together #30634

Open
HongchengZhao opened this issue Mar 1, 2025 · 0 comments · May be fixed by #30732
Open

Cannot use atomicStore with atomicLoad together #30634

HongchengZhao opened this issue Mar 1, 2025 · 0 comments · May be fixed by #30732
Labels
TSL Three.js Shading Language WebGPU
Milestone

Comments

@HongchengZhao
Copy link

HongchengZhao commented Mar 1, 2025

Description

It always fails when I try to load an element from an array of atomic uint, and store it to another array. I wonder if I am doing something wrong or it is a bug?

Reproduction steps

1. define two atomic arrays a and b
2. in a compute shader, load an element from a and store it to b

Code

const a = instancedArray(new Uint32Array([1, 2, 3]), "uint").toAtomic();
const b = instancedArray(new Uint32Array([3, 2, 1]), "uint").toAtomic();
atomicStore(b.element(2), atomicLoad(a.element(0)));

Live example

Screenshots

Image

Version

r174

Device

Desktop

Browser

Edge

OS

MacOS

@Mugen87 Mugen87 added WebGPU TSL Three.js Shading Language labels Mar 1, 2025
@sunag sunag added this to the r175 milestone Mar 13, 2025
@sunag sunag linked a pull request Mar 13, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TSL Three.js Shading Language WebGPU
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants