diff --git a/.pick_status.json b/.pick_status.json index 568f24a7164..fcfc5b8836a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3973,7 +3973,7 @@ "description": "nir/deref: Handle RESTRICT for SSBO deref bindings", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/compiler/nir/nir_deref.c b/src/compiler/nir/nir_deref.c index 7864ae3198f..640a751cc6a 100644 --- a/src/compiler/nir/nir_deref.c +++ b/src/compiler/nir/nir_deref.c @@ -612,7 +612,9 @@ nir_compare_deref_paths(nir_deref_path *a_path, /* If the binding derefs can't alias and at least one is RESTRICT, * then we know they can't alias. */ - if (!(binding_compare & nir_derefs_may_alias_bit)) + if (!(binding_compare & nir_derefs_may_alias_bit) && + ((a_var->data.access & ACCESS_RESTRICT) || + (b_var->data.access & ACCESS_RESTRICT))) return nir_derefs_do_not_alias; return nir_derefs_may_alias_bit;