nir/schedule: add write dep also for shared_atomic

Otherwise it might change the order between a load_shared and a
shared_atomic on the same location.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29918>
(cherry picked from commit 3482ea599b)
This commit is contained in:
Karol Herbst 2024-06-26 18:01:44 +02:00 committed by Eric Engestrom
parent 7da5835003
commit bc75532540
2 changed files with 3 additions and 1 deletions

View file

@ -24,7 +24,7 @@
"description": "nir/schedule: add write dep also for shared_atomic",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -394,6 +394,8 @@ nir_schedule_intrinsic_deps(nir_deps_state *state,
add_read_dep(state, state->store_shared, n);
break;
case nir_intrinsic_shared_atomic:
case nir_intrinsic_shared_atomic_swap:
case nir_intrinsic_store_shared:
case nir_intrinsic_store_shared2_amd:
add_write_dep(state, &state->store_shared, n);