X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglsl%2Flower_variable_index_to_cond_assign.cpp;h=040b0bf83576197bc65602655739672b96a2a6fa;hb=f01f754ca13373d62f5f4ba5ff76d83aa4eac62b;hp=7792e6e624fcc0cbcc138d439209262b07584801;hpb=90cc372400e1f5869baabd841823bbf9296d7b01;p=mesa.git diff --git a/src/glsl/lower_variable_index_to_cond_assign.cpp b/src/glsl/lower_variable_index_to_cond_assign.cpp index 7792e6e624f..040b0bf8357 100644 --- a/src/glsl/lower_variable_index_to_cond_assign.cpp +++ b/src/glsl/lower_variable_index_to_cond_assign.cpp @@ -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()); } @@ -364,12 +364,16 @@ public: return this->lower_temps; case ir_var_uniform: return this->lower_uniforms; - case ir_var_in: + case ir_var_function_in: case ir_var_const_in: - return (var->location == -1) ? this->lower_temps : this->lower_inputs; - case ir_var_out: - return (var->location == -1) ? this->lower_temps : this->lower_outputs; - case ir_var_inout: + return this->lower_temps; + case ir_var_shader_in: + return this->lower_inputs; + case ir_var_function_out: + return this->lower_temps; + case ir_var_shader_out: + return this->lower_outputs; + case ir_var_function_inout: return this->lower_temps; } @@ -525,10 +529,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; }