diff options
author | Ben Skeggs <[email protected]> | 2008-08-14 00:20:52 +1000 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2008-08-14 00:20:52 +1000 |
commit | 56f5c0c001c476b813c94d071ac880fbe8d9768b (patch) | |
tree | 257e2d7c3870a741ad30ea7bc38621d9eb728483 /src/gallium/drivers/cell/spu/spu_exec.c | |
parent | df4228deddea36b9d5b41ea395a216137e046205 (diff) | |
parent | d8be393cb60d908f98f0edb74c1c7964e8f690fe (diff) |
Merge remote branch 'origin/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/gallium/drivers/cell/spu/spu_exec.c')
-rw-r--r-- | src/gallium/drivers/cell/spu/spu_exec.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/gallium/drivers/cell/spu/spu_exec.c b/src/gallium/drivers/cell/spu/spu_exec.c index 96393732ed8..42e5022f30b 100644 --- a/src/gallium/drivers/cell/spu/spu_exec.c +++ b/src/gallium/drivers/cell/spu/spu_exec.c @@ -603,8 +603,8 @@ store_dest( * Kill fragment if any of the four values is less than zero. */ static void -exec_kilp(struct spu_exec_machine *mach, - const struct tgsi_full_instruction *inst) +exec_kil(struct spu_exec_machine *mach, + const struct tgsi_full_instruction *inst) { uint uniquemask; uint chan_index; @@ -640,6 +640,20 @@ exec_kilp(struct spu_exec_machine *mach, mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= kilmask; } +/** + * Execute NVIDIA-style KIL which is predicated by a condition code. + * Kill fragment if the condition code is TRUE. + */ +static void +exec_kilp(struct tgsi_exec_machine *mach, + const struct tgsi_full_instruction *inst) +{ + uint kilmask = 0; /* bit 0 = pixel 0, bit 1 = pixel 1, etc */ + + /* TODO: build kilmask from CC mask */ + + mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= kilmask; +} /* * Fetch a texel using STR texture coordinates. @@ -1336,8 +1350,7 @@ exec_instruction( break; case TGSI_OPCODE_KIL: - /* for enabled ExecMask bits, set the killed bit */ - mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= mach->ExecMask; + exec_kil (mach, inst); break; case TGSI_OPCODE_PK2H: |