panfrost: Build midgard_pack.h via meson
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 5 Aug 2020 21:48:51 +0000 (17:48 -0400)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 13 Aug 2020 06:55:15 +0000 (08:55 +0200)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6195>

src/panfrost/lib/meson.build
src/panfrost/meson.build

index f25b18fcf75c5f158614d24a1b7fa77ab3d634b3..a24eebca002b4f09a56c492a814984c98f216308 100644 (file)
@@ -42,9 +42,17 @@ libpanfrost_decode_files = files(
   'decode.c',
 )
 
+midgard_pack = custom_target(
+  'midgard_pack.h',
+  input : ['gen_pack.py', 'midgard.xml'],
+  output : 'midgard_pack.h',
+  command : [prog_python, '@INPUT@'],
+  capture : true,
+)
+
 libpanfrost_lib = static_library(
   'panfrost_lib',
-  [libpanfrost_lib_files],
+  [libpanfrost_lib_files, midgard_pack],
   include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw],
   c_args : [no_override_init_args],
   gnu_symbol_visibility : 'hidden',
@@ -54,7 +62,7 @@ libpanfrost_lib = static_library(
 
 libpanfrost_decode = static_library(
   'panfrost_decode',
-  [libpanfrost_decode_files],
+  [libpanfrost_decode_files, midgard_pack],
   include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost],
   c_args : [no_override_init_args],
   gnu_symbol_visibility : 'hidden',
index e015941a8a05a347cf16aedca5313826b88cd94d..46605165d060620809a1af763a93215340fa8c53 100644 (file)
@@ -42,7 +42,7 @@ files_bifrost = files(
 
 bifrost_compiler = executable(
   'bifrost_compiler',
-  [files_bifrost],
+  [files_bifrost, midgard_pack],
   include_directories : [
     inc_mapi,
     inc_mesa,