pan/bi: Add discard ops

These run on the ADD unit and evidently need to be their own clause
(probably treated as a high-latency instruction). Like csel, they can
either do a float comparison directly or ingest a 0/1 value.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4025>
This commit is contained in:
Alyssa Rosenzweig 2020-02-28 07:05:31 -05:00 committed by Marge Bot
parent 3044a37a84
commit 178d9d4269
1 changed files with 7 additions and 0 deletions

View File

@ -1318,6 +1318,13 @@ static const struct add_op_info add_op_infos[] = {
{ 0x18100, "LD_VAR_ADDR.f32", ADD_VARYING_ADDRESS, true },
{ 0x18200, "LD_VAR_ADDR.i32", ADD_VARYING_ADDRESS, true },
{ 0x18300, "LD_VAR_ADDR.u32", ADD_VARYING_ADDRESS, true },
// Conditional discards (discard_if) in NIR. Compares the first two
// sources and discards if the result is true
{ 0x19181, "DISCARD.FEQ.f32", ADD_TWO_SRC, true },
{ 0x19189, "DISCARD.FNE.f32", ADD_TWO_SRC, true },
{ 0x1918C, "DISCARD.GL.f32", ADD_TWO_SRC, true }, /* Consumes ICMP.GL/etc with fixed 0 argument */
{ 0x19190, "DISCARD.FLE.f32", ADD_TWO_SRC, true },
{ 0x19198, "DISCARD.FLT.f32", ADD_TWO_SRC, true },
// Implements alpha-to-coverage, as well as possibly the late depth and
// stencil tests. The first source is the existing sample mask in R60
// (possibly modified by gl_SampleMask), and the second source is the alpha