nir/spirv: Use a C99-style initializer for structure fields
[mesa.git] / src / glsl / opt_flip_matrices.cpp
index 2107b1d47406e518f166bba1aa05c2069c4d845c..04c6170b845ba204e3f65e4ec338ad520dc81b23 100644 (file)
@@ -45,8 +45,7 @@ public:
       mvp_transpose = NULL;
       texmat_transpose = NULL;
 
-      foreach_list(n, instructions) {
-         ir_instruction *ir = (ir_instruction *) n;
+      foreach_in_list(ir_instruction, ir, instructions) {
          ir_variable *var = ir->as_variable();
          if (!var)
             continue;
@@ -104,8 +103,8 @@ matrix_flipper::visit_enter(ir_expression *ir)
 
       var_ref->var = texmat_transpose;
 
-      texmat_transpose->max_array_access =
-         MAX2(texmat_transpose->max_array_access, mat_var->max_array_access);
+      texmat_transpose->data.max_array_access =
+         MAX2(texmat_transpose->data.max_array_access, mat_var->data.max_array_access);
 
       progress = true;
    }