diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-10-02 17:07:30 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-10-02 17:07:30 -0600 |
commit | 066ccec49485f0b6d314ef555e4b2a68f68c3804 (patch) | |
tree | dcefe22584be732027a39fc6d059aca190b867b3 /src/mesa/pipe/tgsi/exec/tgsi_exec.c | |
parent | ca34912bf7e57a01b180a3bb3b6e36331f442558 (diff) |
Separate TGSI_OPCODE_KIL and TGSI_OPCODE_KILP (predicated).
These correspond to the NV and ARB-style fragment program KIL instructions.
The former is really supposed to examine the NV condition codes but Mesa's
GLSL compiler always emits unconditional KIL instructions.
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; |