Mesa (master): pan/bi: Structify ADD unit add/min/max

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 6 19:59:01 UTC 2020


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Mon Apr  6 13:48:06 2020 -0400

pan/bi: Structify ADD unit add/min/max

..since it's missing for FMA

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4470>

---

 src/panfrost/bifrost/bifrost.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h
index db173bb0645..88ed61601b2 100644
--- a/src/panfrost/bifrost/bifrost.h
+++ b/src/panfrost/bifrost/bifrost.h
@@ -133,6 +133,23 @@ struct bifrost_add_2src {
         unsigned op   : 14;
 } __attribute__((packed));
 
+#define BIFROST_ADD_OP_FMAX32 (0x00)
+#define BIFROST_ADD_OP_FMIN32 (0x01)
+#define BIFROST_ADD_OP_FADD32 (0x02)
+
+struct bifrost_add_faddmin {
+        unsigned src0 : 3;
+        unsigned src1 : 3;
+        unsigned src1_abs : 1;
+        unsigned src0_neg : 1;
+        unsigned src1_neg : 1;
+        unsigned select : 2;
+        unsigned outmod : 2;
+        unsigned mode : 2;
+        unsigned src0_abs : 1;
+        unsigned op   : 4;
+} __attribute__((packed));
+
 #define BIFROST_ADD_OP_ST_VAR (0x19300 >> 8)
 
 struct bifrost_st_vary {



More information about the mesa-commit mailing list