summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/ir_to_mesa.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2016-02-27 11:23:32 -0800
committerMatt Turner <mattst88@gmail.com>2016-03-01 11:41:29 -0800
commitfc61b41a956f05d57afcb6af7eb61637b4936fb4 (patch)
treeec0e80f2eaf6568f9377b00f158acf924fb139c1 /src/mesa/program/ir_to_mesa.cpp
parent7fe206da28f39ba94990873da1d4a5c85a218c07 (diff)
downloadexternal_mesa3d-fc61b41a956f05d57afcb6af7eb61637b4936fb4.zip
external_mesa3d-fc61b41a956f05d57afcb6af7eb61637b4936fb4.tar.gz
external_mesa3d-fc61b41a956f05d57afcb6af7eb61637b4936fb4.tar.bz2
mesa: Remove EmitCondCodes.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/program/ir_to_mesa.cpp')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 4db6250..6d33b1b 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2124,32 +2124,12 @@ ir_to_mesa_visitor::visit(ir_discard *ir)
void
ir_to_mesa_visitor::visit(ir_if *ir)
{
- ir_to_mesa_instruction *cond_inst, *if_inst;
- ir_to_mesa_instruction *prev_inst;
-
- prev_inst = (ir_to_mesa_instruction *)this->instructions.get_tail();
+ ir_to_mesa_instruction *if_inst;
ir->condition->accept(this);
assert(this->result.file != PROGRAM_UNDEFINED);
- if (this->options->EmitCondCodes) {
- cond_inst = (ir_to_mesa_instruction *)this->instructions.get_tail();
-
- /* See if we actually generated any instruction for generating
- * the condition. If not, then cook up a move to a temp so we
- * have something to set cond_update on.
- */
- if (cond_inst == prev_inst) {
- src_reg temp = get_temp(glsl_type::bool_type);
- cond_inst = emit(ir->condition, OPCODE_MOV, dst_reg(temp), result);
- }
- cond_inst->cond_update = GL_TRUE;
-
- if_inst = emit(ir->condition, OPCODE_IF);
- if_inst->dst.cond_mask = COND_NE;
- } else {
- if_inst = emit(ir->condition, OPCODE_IF, undef_dst, this->result);
- }
+ if_inst = emit(ir->condition, OPCODE_IF, undef_dst, this->result);
this->instructions.push_tail(if_inst);