diff options
author | Jason Ekstrand <[email protected]> | 2019-01-23 16:47:46 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-01-26 13:41:50 -0600 |
commit | 9e34781aef3611bfcc3843694576c5972f0710fb (patch) | |
tree | c88443c2f333d98c54d30a29289de90a367fac8d | |
parent | 9839ce8bf978721c8d3df16b622e1766cb7be30a (diff) |
nir: Allow SSBOs and global to alias
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r-- | src/compiler/nir/nir_deref.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_deref.c b/src/compiler/nir/nir_deref.c index 513e8242d7c..2f5fda643ca 100644 --- a/src/compiler/nir/nir_deref.c +++ b/src/compiler/nir/nir_deref.c @@ -293,7 +293,12 @@ nir_fixup_deref_modes(nir_shader *shader) static bool modes_may_alias(nir_variable_mode a, nir_variable_mode b) { - /* Two pointers can only alias if they have the same mode. + /* Generic pointers can alias with SSBOs */ + if ((a == nir_var_mem_ssbo || a == nir_var_mem_global) && + (b == nir_var_mem_ssbo || b == nir_var_mem_global)) + return true; + + /* In the general case, pointers can only alias if they have the same mode. * * NOTE: In future, with things like OpenCL generic pointers, this may not * be true and will have to be re-evaluated. However, with graphics only, |