mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 17:50:11 +01:00
nir/opt_load_store_vectorize: improve ssbo/global alias analysis
If either the global access or the ssbo access is restrict, they shouldn't alias. No fossil-db changes. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14227>
This commit is contained in:
parent
ac8afe3f44
commit
c56cf157c5
1 changed files with 13 additions and 0 deletions
|
|
@ -926,6 +926,19 @@ bindings_different_restrict(nir_shader *shader, struct entry *a, struct entry *b
|
|||
a_var = a->key->var;
|
||||
b_var = b->key->var;
|
||||
different_bindings = a_var != b_var;
|
||||
} else if (!!a->key->resource != !!b->key->resource) {
|
||||
/* comparing global and ssbo access */
|
||||
different_bindings = true;
|
||||
|
||||
if (a->key->resource) {
|
||||
nir_binding a_res = nir_chase_binding(nir_src_for_ssa(a->key->resource));
|
||||
a_var = nir_get_binding_variable(shader, a_res);
|
||||
}
|
||||
|
||||
if (b->key->resource) {
|
||||
nir_binding b_res = nir_chase_binding(nir_src_for_ssa(b->key->resource));
|
||||
b_var = nir_get_binding_variable(shader, b_res);
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue