summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/ir_to_mesa.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-06-30 17:31:06 -0700
committerEric Anholt <[email protected]>2010-06-30 17:31:06 -0700
commit5e4dd061d17563828bcce5525400a0ce363aa15d (patch)
tree1d5bc17a07b8e8f3d0f88e90f228afbe94cf0645 /src/mesa/shader/ir_to_mesa.cpp
parentf5b3b2a01a320d136df3cf1f8c6fa78685d164d1 (diff)
ir_to_mesa: Add support for discard instructions.
Fixes glsl-fs-discard-01.
Diffstat (limited to 'src/mesa/shader/ir_to_mesa.cpp')
-rw-r--r--src/mesa/shader/ir_to_mesa.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index b140d96851f..b270e2da413 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -1342,9 +1342,10 @@ ir_to_mesa_visitor::visit(ir_return *ir)
void
ir_to_mesa_visitor::visit(ir_discard *ir)
{
- assert(0);
+ assert(ir->condition == NULL); /* FINISHME */
- ir->condition->accept(this);
+ ir_to_mesa_emit_op1(ir, OPCODE_KIL_NV,
+ ir_to_mesa_undef_dst, ir_to_mesa_undef);
}
void