summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-27 10:16:51 -0700
committerBrian <[email protected]>2007-11-27 10:31:55 -0700
commit4fe3bf2d77aeb289d2f1c7c695206c2e7889c5ed (patch)
tree17d65e934027219243ff88d212a32ad462ebef68 /src
parent92e4090b4c52e86f243bd4e6f3e6b48913948a1f (diff)
set fp->UsesKill when emitting OPCODE_KIL
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/slang/slang_emit.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index f180fb949ab..9947544a085 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.3
+ * Version: 7.0.3
*
* Copyright (C) 2005-2007 Brian Paul All Rights Reserved.
*
@@ -859,12 +859,18 @@ emit_return(slang_emit_info *emitInfo, slang_ir_node *n)
static struct prog_instruction *
emit_kill(slang_emit_info *emitInfo)
{
+ struct gl_fragment_program *fp;
struct prog_instruction *inst;
/* NV-KILL - discard fragment depending on condition code.
* Note that ARB-KILL depends on sign of vector operand.
*/
inst = new_instruction(emitInfo, OPCODE_KIL_NV);
- inst->DstReg.CondMask = COND_TR; /* always kill */
+ inst->DstReg.CondMask = COND_TR; /* always branch */
+
+ assert(emitInfo->prog->Target == GL_FRAGMENT_PROGRAM_ARB);
+ fp = (struct gl_fragment_program *) emitInfo->prog;
+ fp->UsesKill = GL_TRUE;
+
return inst;
}