panfrost: Move pan_special_varying definition to pan_encoder.h
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 25 Jan 2021 12:53:32 +0000 (13:53 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 11 Mar 2021 14:30:19 +0000 (14:30 +0000)
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520>

src/gallium/drivers/panfrost/pan_cmdstream.c
src/panfrost/lib/pan_encoder.h

index 24926bb..aeffdf2 100644 (file)
@@ -1762,30 +1762,6 @@ pan_varying_size(enum mali_format fmt)
         return bpc * chan;
 }
 
-/* Indices for named (non-XFB) varyings that are present. These are packed
- * tightly so they correspond to a bitfield present (P) indexed by (1 <<
- * PAN_VARY_*). This has the nice property that you can lookup the buffer index
- * of a given special field given a shift S by:
- *
- *      idx = popcount(P & ((1 << S) - 1))
- *
- * That is... look at all of the varyings that come earlier and count them, the
- * count is the new index since plus one. Likewise, the total number of special
- * buffers required is simply popcount(P)
- */
-
-enum pan_special_varying {
-        PAN_VARY_GENERAL = 0,
-        PAN_VARY_POSITION = 1,
-        PAN_VARY_PSIZ = 2,
-        PAN_VARY_PNTCOORD = 3,
-        PAN_VARY_FACE = 4,
-        PAN_VARY_FRAGCOORD = 5,
-
-        /* Keep last */
-        PAN_VARY_MAX,
-};
-
 /* Given a varying, figure out which index it corresponds to */
 
 static inline unsigned
index 99971d2..7c26b13 100644 (file)
 #include <stdbool.h>
 #include "midgard_pack.h"
 
+/* Indices for named (non-XFB) varyings that are present. These are packed
+ * tightly so they correspond to a bitfield present (P) indexed by (1 <<
+ * PAN_VARY_*). This has the nice property that you can lookup the buffer index
+ * of a given special field given a shift S by:
+ *
+ *      idx = popcount(P & ((1 << S) - 1))
+ *
+ * That is... look at all of the varyings that come earlier and count them, the
+ * count is the new index since plus one. Likewise, the total number of special
+ * buffers required is simply popcount(P)
+ */
+
+enum pan_special_varying {
+        PAN_VARY_GENERAL = 0,
+        PAN_VARY_POSITION = 1,
+        PAN_VARY_PSIZ = 2,
+        PAN_VARY_PNTCOORD = 3,
+        PAN_VARY_FACE = 4,
+        PAN_VARY_FRAGCOORD = 5,
+
+        /* Keep last */
+        PAN_VARY_MAX,
+};
+
 /* Invocation packing */
 
 void