diff options
Diffstat (limited to 'src/mesa/pipe/tgsi/exec/tgsi_exec.c')
-rw-r--r-- | src/mesa/pipe/tgsi/exec/tgsi_exec.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.c b/src/mesa/pipe/tgsi/exec/tgsi_exec.c index edd46100c5..b88620d71d 100644 --- a/src/mesa/pipe/tgsi/exec/tgsi_exec.c +++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.c @@ -1129,8 +1129,12 @@ store_dest( store_dest (mach, VAL, &inst->FullDstRegisters[INDEX], inst, CHAN ) +/** + * Execute ARB-style KIL which is predicated by a src register. + * Kill fragment if any of the four values is less than zero. + */ static void -exec_kil (struct tgsi_exec_machine *mach, +exec_kilp(struct tgsi_exec_machine *mach, const struct tgsi_full_instruction *inst) { GLuint uniquemask; @@ -1168,6 +1172,14 @@ exec_kil (struct tgsi_exec_machine *mach, } +static void +exec_kil(struct tgsi_exec_machine *mach, + const struct tgsi_full_instruction *inst) +{ + /* for enabled ExecMask bits, set the killed bit */ + mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= mach->ExecMask; +} + /* @@ -1782,6 +1794,10 @@ exec_instruction( } break; + case TGSI_OPCODE_KILP: + exec_kilp (mach, inst); + break; + case TGSI_OPCODE_KIL: exec_kil (mach, inst); break; |