From ffdf10d3082487259e51c67356f5469deba201d2 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 6 Jan 2025 13:56:40 -0500 Subject: [PATCH] nir/lower_robust_access: fix robustness with atomic swap this was missed in the original v3d pass, and then the common code port inherited the bug. (so strictly this fix "should" be backported even farther back but it won't apply before the Fixes here, and I don't think we do LTS that far back anyway). in theory this should fix a corner case with robustness on the gl (but not vulkan, at least for apple) drivers on broadcom & apple. Fixes: f0fb8d05e30 ("nir: Add nir_lower_robust_access pass") Signed-off-by: Alyssa Rosenzweig Reviewed-by: Lionel Landwerlin Reviewed-by: Iago Toral Quiroga (cherry picked from commit d9b4867e2ae9d9cfed178a4406644c4f48438665) Conflicts: src/compiler/nir/nir_lower_robust_access.c Part-of: --- .pick_status.json | 2 +- src/compiler/nir/nir_lower_robust_access.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index a78ad9bc8f3..1e037f91c1e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -14,7 +14,7 @@ "description": "nir/lower_robust_access: fix robustness with atomic swap", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f0fb8d05e30c51e070155c957f3b71cf31c4b784", "notes": null diff --git a/src/compiler/nir/nir_lower_robust_access.c b/src/compiler/nir/nir_lower_robust_access.c index cdf103eed8f..e5a3ba24885 100644 --- a/src/compiler/nir/nir_lower_robust_access.c +++ b/src/compiler/nir/nir_lower_robust_access.c @@ -211,6 +211,7 @@ lower(nir_builder *b, nir_instr *instr, void *_opts) } return false; case nir_intrinsic_ssbo_atomic: + case nir_intrinsic_ssbo_atomic_swap: if (opts->lower_ssbo) { lower_buffer_atomic(b, intr); return true;