X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglsl%2Fopt_flip_matrices.cpp;h=04c6170b845ba204e3f65e4ec338ad520dc81b23;hb=f90c6b1ce0d96c7dbdd32ab913d5c88913700ba2;hp=497513fe82e4e01ecc2aa4850059f83fbf8bf522;hpb=e413d3f15ca72b82ca29e43f010597a83427d5e8;p=mesa.git diff --git a/src/glsl/opt_flip_matrices.cpp b/src/glsl/opt_flip_matrices.cpp index 497513fe82e..04c6170b845 100644 --- a/src/glsl/opt_flip_matrices.cpp +++ b/src/glsl/opt_flip_matrices.cpp @@ -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; @@ -81,8 +80,10 @@ matrix_flipper::visit_enter(ir_expression *ir) 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); @@ -102,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; }