Mesa (main): pan/gen_macros: Include midgard_pack.h from gen_macros.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 26 08:52:45 UTC 2021


Module: Mesa
Branch: main
Commit: f96a30cea5ae13088b829774be5acd72b7400cac
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f96a30cea5ae13088b829774be5acd72b7400cac

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Wed Jul 28 11:15:31 2021 +0200

pan/gen_macros: Include midgard_pack.h from gen_macros.h

This way we will only have a single entry point, thus making the
transition to per-gen XML files easier.

Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551>

---

 src/panfrost/lib/gen_macros.h | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/panfrost/lib/gen_macros.h b/src/panfrost/lib/gen_macros.h
index 1426a9cb1ff..88225abc2d9 100644
--- a/src/panfrost/lib/gen_macros.h
+++ b/src/panfrost/lib/gen_macros.h
@@ -49,12 +49,13 @@
  * possible.
  */
 
-/* Base macro defined on the command line.  If we don't have this, we can't
- * do anything.
- */
+/* Base macro defined on the command line. */
 #ifndef PAN_ARCH
-#  error "The PAN_ARCH macro must be defined"
-#endif
+/* This will be replaced by a minimal definition header as soon as the
+ * per-gen transition is complete.
+ */
+#  include "midgard_pack.h"
+#else
 
 #if PAN_ARCH >= 6
 #define TILER_JOB BIFROST_TILER_JOB
@@ -69,14 +70,19 @@
 /* Suffixing macros */
 #if (PAN_ARCH == 4)
 #  define GENX(X) X##_v4
+#  include "midgard_pack.h"
 #elif (PAN_ARCH == 5)
 #  define GENX(X) X##_v5
+#  include "midgard_pack.h"
 #elif (PAN_ARCH == 6)
 #  define GENX(X) X##_v6
+#  include "midgard_pack.h"
 #elif (PAN_ARCH == 7)
 #  define GENX(X) X##_v7
+#  include "midgard_pack.h"
 #else
 #  error "Need to add suffixing macro for this architecture"
 #endif
 
+#endif /* PAN_ARCH */
 #endif /* GEN_MACROS_H */



More information about the mesa-commit mailing list