summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/ir_to_mesa.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-02-27 13:19:50 -0800
committerMatt Turner <[email protected]>2016-03-01 11:41:29 -0800
commit9e11ff7e11c87dd19d2274644bca7a869ff2143d (patch)
tree46b51fcde60dc58b34bcb65b795cba69c45a1992 /src/mesa/program/ir_to_mesa.cpp
parenta0c3650ad359df8f770eee042d60359492df3702 (diff)
program: Remove OPCODE_KIL_NV.
Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/program/ir_to_mesa.cpp')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 6051df1546d..c7ca3dc6cd6 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2112,13 +2112,12 @@ ir_to_mesa_visitor::visit(ir_return *ir)
void
ir_to_mesa_visitor::visit(ir_discard *ir)
{
- if (ir->condition) {
- ir->condition->accept(this);
- this->result.negate = ~this->result.negate;
- emit(ir, OPCODE_KIL, undef_dst, this->result);
- } else {
- emit(ir, OPCODE_KIL_NV);
- }
+ if (!ir->condition)
+ ir->condition = new(mem_ctx) ir_constant(true);
+
+ ir->condition->accept(this);
+ this->result.negate = ~this->result.negate;
+ emit(ir, OPCODE_KIL, undef_dst, this->result);
}
void