pan/mdg: Add roundmode enum
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 25 May 2020 18:05:34 +0000 (14:05 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 3 Jun 2020 15:36:57 +0000 (15:36 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>

src/panfrost/midgard/compiler.h
src/panfrost/midgard/midgard.h

index 1765bfd8551a1468a3e06165d43de24193e99d1c..7e2a453584c004fe3920175e418390bf456f4401 100644 (file)
@@ -121,6 +121,9 @@ typedef struct midgard_instruction {
         /* Out of the union for csel (could maybe be fixed..) */
         bool src_invert[MIR_SRC_COUNT];
 
+        /* If the op supports it */
+        enum midgard_roundmode roundmode;
+
         /* Special fields for an ALU instruction */
         midgard_reg_info registers;
 
index 4e7c80585d5820b17b97ff8b685c56f6f47b74b0..bb93d0d653dea367d73763005698b568cdd727ee 100644 (file)
@@ -822,4 +822,11 @@ typedef union midgard_constants {
 }
 midgard_constants;
 
+enum midgard_roundmode {
+        MIDGARD_RTE = 0x0, /* round to even */
+        MIDGARD_RTZ = 0x1, /* round to zero */
+        MIDGARD_RTN = 0x2, /* round to negative */
+        MIDGARD_RTP = 0x3, /* round to positive */
+};
+
 #endif