Sign in
dawn
/
dawn
/
0e4a030b1708b80e5c7430a5b7fa0e34dfbd230c
/
.
/
test
/
tint
/
statements
/
discard
/
atomic_cmpxchg.wgsl.expected.wgsl
blob: b430e288bd181062c70d6e903bca27d8c7a40a4b [
file
] [
log
] [
blame
]
@group
(
0
)
@binding
(
0
)
var
<
storage
,
read_write
>
a
:
atomic
<i32>
;
@fragment
fn foo
()
->
@location
(
0
)
i32
{
discard
;
var
x
=
0
;
let
result
=
atomicCompareExchangeWeak
(&(
a
),
0
,
1
);
if
(
result
.
exchanged
)
{
x
=
result
.
old_value
;
}
return
x
;
}