mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-15 20:01:22 +00:00
The following operations are supported: OpAtomicLoad OpAtomicStore OpAtomicExchange OpAtomicCompareExchange OpAtomicCompareExchangeWeak OpAtomicIIncrement OpAtomicIDecrement OpAtomicIAdd OpAtomicISub OpAtomicSMin OpAtomicUMin OpAtomicSMax OpAtomicUMax OpAtomicAnd OpAtomicOr OpAtomicXor These are not, but may be supported in the future: OpAtomicFlagTestAndSet OpAtomicFlagClear OpAtomicFMinEXT OpAtomicFMaxEXT OpAtomicFAddEXT Bug: tint:1441 Change-Id: Ifd53643b38d43664905a0dddfca609add4914670 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94121 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
28 lines
290 B
WebGPU Shading Language
28 lines
290 B
WebGPU Shading Language
struct S0 {
|
|
x : i32,
|
|
a : atomic<u32>,
|
|
y : i32,
|
|
z : i32,
|
|
};
|
|
|
|
struct S1 {
|
|
x : i32,
|
|
a : S0,
|
|
y : i32,
|
|
z : i32,
|
|
};
|
|
|
|
struct S2 {
|
|
x : i32,
|
|
y : i32,
|
|
z : i32,
|
|
a : S1,
|
|
};
|
|
|
|
var<workgroup> wg: S2;
|
|
|
|
@compute @workgroup_size(1)
|
|
fn compute_main() {
|
|
atomicStore(&wg.a.a.a, 1u);
|
|
}
|