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;
if (mvp_transpose &&
strcmp(mat_var->name, "gl_ModelViewProjectionMatrix") == 0) {
+#ifndef NDEBUG
ir_dereference_variable *deref = ir->operands[0]->as_dereference_variable();
assert(deref && deref->var == mat_var);
+#endif
void *mem_ctx = ralloc_parent(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;
}