summaryrefslogtreecommitdiff
path: root/src/mesa/program
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-08-31 13:02:59 -0700
committerEric Anholt <eric@anholt.net>2010-08-31 15:43:49 -0700
commit9b075cb9fa9eb6a95d0816283ef01ae72dafa680 (patch)
tree59f27f53b84fab6f5e2f42957035786217b4443b /src/mesa/program
parente38d2f716381385e2aad219a3d125065ec0a01bd (diff)
ir_to_mesa: When emitting a pixel kill, flag that we did so.
Both i965 and swrast rely on UsesKill to determine whether to do early depth writes. Fixes glsl-fs-discard-02. Bug #29835.
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 8f39a225af..57458d0281 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2041,9 +2041,12 @@ ir_to_mesa_visitor::visit(ir_return *ir)
void
ir_to_mesa_visitor::visit(ir_discard *ir)
{
+ struct gl_fragment_program *fp = (struct gl_fragment_program *)this->prog;
+
assert(ir->condition == NULL); /* FINISHME */
ir_to_mesa_emit_op0(ir, OPCODE_KIL_NV);
+ fp->UsesKill = GL_TRUE;
}
void