mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
cell: KILP is a predicated discard, KIL is a conditional discard.
This commit is contained in:
parent
f0874d1a6b
commit
e8e75c8c86
1 changed files with 17 additions and 4 deletions
|
|
@ -603,8 +603,8 @@ store_dest(
|
||||||
* Kill fragment if any of the four values is less than zero.
|
* Kill fragment if any of the four values is less than zero.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
exec_kilp(struct spu_exec_machine *mach,
|
exec_kil(struct spu_exec_machine *mach,
|
||||||
const struct tgsi_full_instruction *inst)
|
const struct tgsi_full_instruction *inst)
|
||||||
{
|
{
|
||||||
uint uniquemask;
|
uint uniquemask;
|
||||||
uint chan_index;
|
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;
|
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.
|
* Fetch a texel using STR texture coordinates.
|
||||||
|
|
@ -1336,8 +1350,7 @@ exec_instruction(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TGSI_OPCODE_KIL:
|
case TGSI_OPCODE_KIL:
|
||||||
/* for enabled ExecMask bits, set the killed bit */
|
exec_kil (mach, inst);
|
||||||
mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= mach->ExecMask;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TGSI_OPCODE_PK2H:
|
case TGSI_OPCODE_PK2H:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue