tgsi: fix-up KILP comments

KILP is really unconditional fragment kill.

We've had KIL and KILP transposed forever.  I'll fix that next.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
This commit is contained in:
Brian Paul 2013-07-11 16:00:45 -06:00
parent e7c3898725
commit f501baabdb
4 changed files with 9 additions and 10 deletions

View File

@ -2096,8 +2096,7 @@ emit_kil(
/**
* Predicated fragment kill.
* XXX Actually, we do an unconditional kill (as in tgsi_exec.c).
* Unconditional fragment kill.
* The only predication is the execution mask which will apply if
* we're inside a loop or conditional.
*/

View File

@ -1614,8 +1614,7 @@ exec_kil(struct tgsi_exec_machine *mach,
}
/**
* Execute NVIDIA-style KIL which is predicated by a condition code.
* Kill fragment if the condition code is TRUE.
* Unconditional fragment kill/discard.
*/
static void
exec_kilp(struct tgsi_exec_machine *mach,
@ -1623,7 +1622,7 @@ exec_kilp(struct tgsi_exec_machine *mach,
{
uint kilmask; /* bit 0 = pixel 0, bit 1 = pixel 1, etc */
/* "unconditional" kil */
/* kill fragment for all fragments currently executing */
kilmask = mach->ExecMask;
mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= kilmask;
}

View File

@ -471,11 +471,6 @@ This instruction replicates its result.
dst.w = partialy(src.w)
.. opcode:: KILP - Predicated Discard
Not really predicated, just unconditional discard
.. opcode:: PK2H - Pack Two 16-bit Floats
TBD
@ -755,6 +750,11 @@ This instruction replicates its result.
endif
.. opcode:: KILP - Discard
Unconditional discard. Allowed in fragment shaders only.
.. opcode:: SCS - Sine Cosine
.. math::

View File

@ -2978,6 +2978,7 @@ glsl_to_tgsi_visitor::visit(ir_discard *ir)
this->result.negate = ~this->result.negate;
emit(ir, TGSI_OPCODE_KIL, undef_dst, this->result);
} else {
/* unconditional kil */
emit(ir, TGSI_OPCODE_KILP);
}
}