2021-06-18 18:56:13 +00:00
|
|
|
RWByteAddressBuffer sb_rw : register(u0, space0);
|
2021-06-18 18:56:13 +00:00
|
|
|
|
2021-06-18 18:56:13 +00:00
|
|
|
void atomicExchange_f2e22f() {
|
|
|
|
int atomic_result = 0;
|
2021-07-09 12:35:54 +00:00
|
|
|
sb_rw.InterlockedExchange(0u, 1, atomic_result);
|
2021-06-18 18:56:13 +00:00
|
|
|
int res = atomic_result;
|
|
|
|
}
|
2021-06-18 18:56:13 +00:00
|
|
|
|
2021-06-18 18:56:13 +00:00
|
|
|
void fragment_main() {
|
|
|
|
atomicExchange_f2e22f();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
[numthreads(1, 1, 1)]
|
|
|
|
void compute_main() {
|
|
|
|
atomicExchange_f2e22f();
|
|
|
|
return;
|
|
|
|
}
|