-
Notifications
You must be signed in to change notification settings - Fork 195
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
atomicCompareExchangeWeak not working #1755
Comments
So this is the validation triggering, and while it can be fixed, the backends don't really implement any atomic comparison methods yet. Reason being that we need to return a proper type first - see #1161 (comment) |
Would it be possible to just return the bool for now? As far as I know, the only use of this function is for a lock and you don't need the original value for that. |
We could implement something in the backends, but it would be partially wasted work, since this isn't going to be the API of WGSL but rather something ad-hoc. |
…_compare_exchange_result` struct, and add SPIR-V codegen for it. Partially addresses #2113, gfx-rs#1755.
…_compare_exchange_result` struct, and add SPIR-V codegen for it. Partially addresses gpuweb/gpuweb#2113, gfx-rs#1755.
…2165) * Add support for WGSL's `atomicCompareExchangeWeak` with the `__atomic_compare_exchange_result` struct, and add SPIR-V codegen for it. Partially addresses gpuweb/gpuweb#2113, #1755. * Add tests for `atomicCompareExchangeWeak`, and support both u32 and i32 atomics with it. * More thorough typechecking of the struct returned by `atomicCompareExchangeWeak`.
Validation was updated by #2165 which also added support for SPIR-V codegen. |
Description
When using atomicCompareExchangeWeak I get a validation error:
Result type for [33] doesn't match the statement
Expected vs observed behaviour
I'd expect the behaviour explained in the spec.
Platform
The text was updated successfully, but these errors were encountered: