glsl: initialise killed_all field.
[mesa.git] / src / glsl / lower_variable_index_to_cond_assign.cpp
index 7792e6e624fcc0cbcc138d439209262b07584801..57771074a8c71b061f7e37b34d219323199b3f0e 100644 (file)
@@ -117,7 +117,7 @@ compare_index_block(exec_list *instructions, ir_variable *index,
 }
 
 static inline bool
-is_array_or_matrix(const ir_instruction *ir)
+is_array_or_matrix(const ir_rvalue *ir)
 {
    return (ir->type->is_array() || ir->type->is_matrix());
 }
@@ -525,10 +525,12 @@ lower_variable_index_to_cond_assign(exec_list *instructions,
     * matrix columns of an array of matrix), each pass will only lower one
     * level of indirection.
     */
+   bool progress_ever = false;
    do {
       v.progress = false;
       visit_list_elements(&v, instructions);
+      progress_ever = v.progress || progress_ever;
    } while (v.progress);
 
-   return v.progress;
+   return progress_ever;
 }