Mesa (master): panfrost/midgard: Map more bany/ball opcodes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Mar 26 23:37:32 UTC 2019


Module: Mesa
Branch: master
Commit: 53664108c2906e6c6d7fb79d61686ec9cb65fd8d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=53664108c2906e6c6d7fb79d61686ec9cb65fd8d

Author: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Date:   Mon Mar 25 00:12:06 2019 +0000

panfrost/midgard: Map more bany/ball opcodes

Some of these are not yet fully functional due to related bugs, but this
the correct op mapping. The native ball/bany opcodes act on vec4's
unconditionally. That said, both ball and bany have the nice property
that duplicating an argument does not affect their output, so the
default "hanging swizzles" allow us to implement 2/3-component opcodes
correctly, implicitly lowering.

Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>

---

 src/gallium/drivers/panfrost/midgard/midgard_compile.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
index 2be883fa3fc..fe779b154a8 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
@@ -1007,9 +1007,20 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr)
                 ALU_CASE(ishr, iasr);
                 ALU_CASE(ushr, ilsr);
 
+                ALU_CASE(ball_fequal2, fball_eq);
+                ALU_CASE(ball_fequal3, fball_eq);
                 ALU_CASE(ball_fequal4, fball_eq);
+
+                ALU_CASE(bany_fnequal2, fbany_neq);
+                ALU_CASE(bany_fnequal3, fbany_neq);
                 ALU_CASE(bany_fnequal4, fbany_neq);
+
+                ALU_CASE(ball_iequal2, iball_eq);
+                ALU_CASE(ball_iequal3, iball_eq);
                 ALU_CASE(ball_iequal4, iball_eq);
+
+                ALU_CASE(bany_inequal2, ibany_neq);
+                ALU_CASE(bany_inequal3, ibany_neq);
                 ALU_CASE(bany_inequal4, ibany_neq);
 
         /* For greater-or-equal, we use less-or-equal and flip the




More information about the mesa-commit mailing list