diff options
author | Timothy Arceri <[email protected]> | 2017-09-21 12:11:48 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-09-21 13:28:09 +1000 |
commit | db4222fc542821d8a187426cdf3abe997ee0120d (patch) | |
tree | 0c6c22325f6d6753e6487475031b53ec328b430f | |
parent | a40b3d5a3c6bbaec03bd6978c2e174d22998b0ed (diff) |
mesa/st: fix infinite loops
Fixes: 9ac8fece63a9 (glsl: Unify ir_constant::const_elements and ::components)
Reviewed-by: Dylan Baker <[email protected]
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 03d615ffe4c..e4803aa4903 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -1922,7 +1922,7 @@ ir_to_mesa_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(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 b49590bd6b6..609920a7a87 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++; |