Mesa (master): nir/validate: Allow array derefs of vectors for nir_var_mem_global

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jan 26 22:15:40 UTC 2019


Module: Mesa
Branch: master
Commit: 9839ce8bf978721c8d3df16b622e1766cb7be30a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9839ce8bf978721c8d3df16b622e1766cb7be30a

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Sat Jan 19 18:54:45 2019 -0600

nir/validate: Allow array derefs of vectors for nir_var_mem_global

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Karol Herbst <kherbst at redhat.com>

---

 src/compiler/nir/nir_validate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c
index 444c0b789a..17633323dc 100644
--- a/src/compiler/nir/nir_validate.c
+++ b/src/compiler/nir/nir_validate.c
@@ -448,7 +448,8 @@ validate_deref_instr(nir_deref_instr *instr, validate_state *state)
       case nir_deref_type_array_wildcard:
          if (instr->mode == nir_var_mem_ubo ||
              instr->mode == nir_var_mem_ssbo ||
-             instr->mode == nir_var_mem_shared) {
+             instr->mode == nir_var_mem_shared ||
+             instr->mode == nir_var_mem_global) {
             /* Shared variables and UBO/SSBOs have a bit more relaxed rules
              * because we need to be able to handle array derefs on vectors.
              * Fortunately, nir_lower_io handles these just fine.




More information about the mesa-commit mailing list