nir: fix a bug in is_dual_slot in nir_io_add_const_offset_to_base
[mesa.git] / src / compiler / nir / nir_lower_io_arrays_to_elements.c
index c4c7c5cc9c7cbf432acf85f364b209a2a7040455..e49abefc0d46d7322a3b72b4e14a36c88b1e8f31 100644 (file)
@@ -293,6 +293,10 @@ lower_io_arrays_to_elements(nir_shader *shader, nir_variable_mode mask,
                if (var->data.compact)
                   continue;
 
+               /* Per-view variables are expected to remain arrays. */
+               if (var->data.per_view)
+                  continue;
+
                /* Skip indirects */
                int loc = var->data.location * 4 + var->data.location_frac;
                if (BITSET_TEST(indirects, loc))