X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglsl%2Flower_if_to_cond_assign.cpp;h=2c5d5612d0d805783ef8ad895c9ba0b80cebfb6b;hb=f01f754ca13373d62f5f4ba5ff76d83aa4eac62b;hp=94b24db1b29adaa2c0cea25307c3d41ac9f1f070;hpb=a352e2d08e0a141298275e77f25541218a97afb7;p=mesa.git diff --git a/src/glsl/lower_if_to_cond_assign.cpp b/src/glsl/lower_if_to_cond_assign.cpp index 94b24db1b29..2c5d5612d0d 100644 --- a/src/glsl/lower_if_to_cond_assign.cpp +++ b/src/glsl/lower_if_to_cond_assign.cpp @@ -79,6 +79,9 @@ public: bool lower_if_to_cond_assign(exec_list *instructions, unsigned max_depth) { + if (max_depth == UINT_MAX) + return false; + ir_if_to_cond_assign_visitor v(max_depth); visit_list_elements(&v, instructions); @@ -169,7 +172,6 @@ ir_if_to_cond_assign_visitor::visit_leave(ir_if *ir) bool found_control_flow = false; ir_assignment *assign; - ir_dereference_variable *deref; /* Check that both blocks don't contain anything we can't support. */ foreach_iter(exec_list_iterator, then_iter, ir->then_instructions) {