summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-02-28 07:05:31 -0500
committerMarge Bot <[email protected]>2020-03-03 00:03:50 +0000
commit178d9d42696876fe244543a2c897e4c702a51cbd (patch)
treee1a4a76575b3223bf67c585e0ca15e4d8f7f9829
parent3044a37a84086f4965fda46b718ce252c42b1187 (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4025>
-rw-r--r--src/panfrost/bifrost/disassemble.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/disassemble.c b/src/panfrost/bifrost/disassemble.c
index 3e3f6a9bc6c..463eafa48a2 100644
--- a/src/panfrost/bifrost/disassemble.c
+++ b/src/panfrost/bifrost/disassemble.c
@@ -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