aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-09-29 16:20:48 -0700
committerEric Anholt <[email protected]>2010-09-29 16:40:31 -0700
commitad1506c5ac61b75e45f24a2e18c91dc8a49a3bb0 (patch)
tree2a9ee763fc918795cb689692ee47175ee51891d5 /src/mesa/drivers
parentb90c7d1713c5a52fd85cb9dacad5828ae2fdbf6c (diff)
i965: Remove my "safety counter" code from loops.
I've screwed this up enough times that I don't think it's worth it. This time, it was that I was doing it once per top-level body instruction instead of just once at the end of the loop body.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index b00930d5cf4..efbb4c66920 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1400,12 +1400,6 @@ fs_visitor::visit(ir_loop *ir)
}
}
- /* Start a safety counter. If the user messed up their loop
- * counting, we don't want to hang the GPU.
- */
- fs_reg max_iter = fs_reg(this, glsl_type::int_type);
- emit(fs_inst(BRW_OPCODE_MOV, max_iter, fs_reg(10000)));
-
emit(fs_inst(BRW_OPCODE_DO));
if (ir->to) {
@@ -1445,17 +1439,9 @@ fs_visitor::visit(ir_loop *ir)
foreach_iter(exec_list_iterator, iter, ir->body_instructions) {
ir_instruction *ir = (ir_instruction *)iter.get();
- fs_inst *inst;
this->base_ir = ir;
ir->accept(this);
-
- /* Check the maximum loop iters counter. */
- inst = emit(fs_inst(BRW_OPCODE_ADD, max_iter, max_iter, fs_reg(-1)));
- inst->conditional_mod = BRW_CONDITIONAL_Z;
-
- inst = emit(fs_inst(BRW_OPCODE_BREAK));
- inst->predicated = true;
}
if (ir->increment) {