summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_nvfragprog.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-04-02 17:27:46 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-04-02 17:27:46 +0000
commitff1a015ca86ed4ea2ca3fdd49ed9daaae19359a2 (patch)
treee8d6b32b675f6aa9dcaa631795352ec6acbb8976 /src/mesa/swrast/s_nvfragprog.c
parent17355e8b38d4581a069d3daf1d1bba87f1eb3612 (diff)
Implement ARB_f_p KIL correctly.
Diffstat (limited to 'src/mesa/swrast/s_nvfragprog.c')
-rw-r--r--src/mesa/swrast/s_nvfragprog.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c
index c262618dda..036c1870d1 100644
--- a/src/mesa/swrast/s_nvfragprog.c
+++ b/src/mesa/swrast/s_nvfragprog.c
@@ -763,7 +763,7 @@ execute_program( GLcontext *ctx,
store_vector4( inst, machine, result );
}
break;
- case FP_OPCODE_KIL:
+ case FP_OPCODE_KIL_NV: /* NV_f_p only */
{
const GLuint *swizzle = inst->DstReg.CondSwizzle;
const GLuint condMask = inst->DstReg.CondMask;
@@ -775,6 +775,15 @@ execute_program( GLcontext *ctx,
}
}
break;
+ case FP_OPCODE_KIL: /* ARB_f_p only */
+ {
+ GLfloat a[4];
+ fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a );
+ if (a[0] < 0.0F || a[1] < 0.0F || a[2] < 0.0F || a[3] < 0.0F) {
+ return GL_FALSE;
+ }
+ }
+ break;
case FP_OPCODE_LG2: /* log base 2 */
{
GLfloat a[4], result[4];