From ff1a015ca86ed4ea2ca3fdd49ed9daaae19359a2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 2 Apr 2004 17:27:46 +0000 Subject: Implement ARB_f_p KIL correctly. --- src/mesa/swrast/s_nvfragprog.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/mesa/swrast/s_nvfragprog.c') 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]; -- cgit v1.2.3