From db4222fc542821d8a187426cdf3abe997ee0120d Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 21 Sep 2017 12:11:48 +1000 Subject: [PATCH] mesa/st: fix infinite loops Fixes: 9ac8fece63a9 (glsl: Unify ir_constant::const_elements and ::components) Reviewed-by: Dylan Baker accept(this); src = this->result; - for (i = 0; i < (unsigned int)size; i++) { + for (unsigned j = 0; j < (unsigned int)size; j++) { emit(ir, OPCODE_MOV, temp, src); src.index++; diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index b49590b..609920a 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -3054,7 +3054,7 @@ glsl_to_tgsi_visitor::visit(ir_constant *ir) field_value->accept(this); src = this->result; - for (i = 0; i < (unsigned int)size; i++) { + for (unsigned j = 0; j < (unsigned int)size; j++) { emit_asm(ir, TGSI_OPCODE_MOV, temp, src); src.index++; -- 2.7.4