case nir_deref_type_array:
case nir_deref_type_array_wildcard:
- if (instr->mode == nir_var_shared) {
- /* Shared variables 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.
+ if (instr->mode == nir_var_ubo ||
+ instr->mode == nir_var_ssbo ||
+ instr->mode == nir_var_shared) {
+ /* 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.
*/
validate_assert(state, glsl_type_is_array(parent->type) ||
glsl_type_is_matrix(parent->type) ||