nir: add nir_var_vec_indexable_modes

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511>
This commit is contained in:
Rhys Perry
2020-11-09 14:41:38 +00:00
parent fb01882ddb
commit 276e241b57
2 changed files with 5 additions and 3 deletions

View File

@@ -471,9 +471,7 @@ validate_deref_instr(nir_deref_instr *instr, validate_state *state)
case nir_deref_type_array:
case nir_deref_type_array_wildcard:
if (instr->modes & (nir_var_mem_ubo | nir_var_mem_ssbo |
nir_var_mem_shared | nir_var_mem_global |
nir_var_mem_push_const)) {
if (instr->modes & nir_var_vec_indexable_modes) {
/* 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.