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: f0fb8d05e3 ("nir: Add nir_lower_robust_access pass")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit d9b4867e2a)

Conflicts:
	src/compiler/nir/nir_lower_robust_access.c

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33113>
This commit is contained in:
Alyssa Rosenzweig
2025-01-06 13:56:40 -05:00
committed by Dylan Baker
parent b7e7e9a904
commit ffdf10d308
2 changed files with 2 additions and 1 deletions

View File

@@ -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

View File

@@ -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;