From bc75532540a986a9bda2ac8a7f47572a7326cacd Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Wed, 26 Jun 2024 18:01:44 +0200 Subject: [PATCH] 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: (cherry picked from commit 3482ea599bed7618a4865e5fa0c073efa54ef08d) --- .pick_status.json | 2 +- src/compiler/nir/nir_schedule.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 50b78941e74..066f8ab468b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/compiler/nir/nir_schedule.c b/src/compiler/nir/nir_schedule.c index 61c4d2c4f27..beb88f9f6b0 100644 --- a/src/compiler/nir/nir_schedule.c +++ b/src/compiler/nir/nir_schedule.c @@ -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);