}
}
- /* 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) {
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) {