Mesa (master): intel: Move batch decoder/disassembler from tools/ to common/

Kenneth Graunke kwg at kemper.freedesktop.org
Wed May 2 16:28:16 UTC 2018


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue May  1 17:27:08 2018 -0700

intel: Move batch decoder/disassembler from tools/ to common/

Making these part of libintel_common allows us to use them in the DRI
driver.  The standalone tool binaries already link against the common
library, too, so it's no harder for them.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

---

 src/intel/Makefile.sources                        | 3 +++
 src/intel/Makefile.tools.am                       | 8 +-------
 src/intel/{tools => common}/gen_batch_decoder.c   | 0
 src/intel/{tools/disasm.c => common/gen_disasm.c} | 0
 src/intel/{tools => common}/gen_disasm.h          | 0
 src/intel/common/meson.build                      | 3 +++
 src/intel/tools/meson.build                       | 6 ++----
 7 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/intel/Makefile.sources b/src/intel/Makefile.sources
index 91c71a8dfa..1adf6f990c 100644
--- a/src/intel/Makefile.sources
+++ b/src/intel/Makefile.sources
@@ -9,10 +9,13 @@ BLORP_FILES = \
 
 COMMON_FILES = \
 	common/gen_clflush.h \
+	common/gen_batch_decoder.c \
 	common/gen_debug.c \
 	common/gen_debug.h \
 	common/gen_decoder.c \
 	common/gen_decoder.h \
+	common/gen_disasm.c \
+	common/gen_disasm.h \
 	common/gen_defines.h \
 	common/gen_l3_config.c \
 	common/gen_l3_config.h \
diff --git a/src/intel/Makefile.tools.am b/src/intel/Makefile.tools.am
index a8685c24e1..b00cc8cc2c 100644
--- a/src/intel/Makefile.tools.am
+++ b/src/intel/Makefile.tools.am
@@ -25,9 +25,6 @@ noinst_PROGRAMS += \
 
 tools_aubinator_SOURCES = \
 	tools/aubinator.c \
-	tools/disasm.c \
-	tools/gen_batch_decoder.c \
-	tools/gen_disasm.h \
 	tools/intel_aub.h
 
 tools_aubinator_CFLAGS = \
@@ -48,10 +45,7 @@ tools_aubinator_LDADD = \
 
 
 tools_aubinator_error_decode_SOURCES = \
-	tools/aubinator_error_decode.c \
-	tools/disasm.c \
-	tools/gen_batch_decoder.c \
-	tools/gen_disasm.h
+	tools/aubinator_error_decode.c
 
 tools_aubinator_error_decode_LDADD = \
 	common/libintel_common.la \
diff --git a/src/intel/tools/gen_batch_decoder.c b/src/intel/common/gen_batch_decoder.c
similarity index 100%
rename from src/intel/tools/gen_batch_decoder.c
rename to src/intel/common/gen_batch_decoder.c
diff --git a/src/intel/tools/disasm.c b/src/intel/common/gen_disasm.c
similarity index 100%
rename from src/intel/tools/disasm.c
rename to src/intel/common/gen_disasm.c
diff --git a/src/intel/tools/gen_disasm.h b/src/intel/common/gen_disasm.h
similarity index 100%
rename from src/intel/tools/gen_disasm.h
rename to src/intel/common/gen_disasm.h
diff --git a/src/intel/common/meson.build b/src/intel/common/meson.build
index 5e0394a5b8..ebf69c0537 100644
--- a/src/intel/common/meson.build
+++ b/src/intel/common/meson.build
@@ -22,10 +22,13 @@
 
 files_libintel_common = files(
   'gen_clflush.h',
+  'gen_batch_decoder.c',
   'gen_debug.c',
   'gen_debug.h',
   'gen_decoder.c',
   'gen_decoder.h',
+  'gen_disasm.c',
+  'gen_disasm.h',
   'gen_l3_config.c',
   'gen_l3_config.h',
   'gen_urb_config.c',
diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build
index e19de5af88..0be530546c 100644
--- a/src/intel/tools/meson.build
+++ b/src/intel/tools/meson.build
@@ -20,8 +20,7 @@
 
 aubinator = executable(
   'aubinator',
-  files('aubinator.c', 'disasm.c', 'gen_batch_decoder.c',
-        'gen_disasm.h', 'intel_aub.h'),
+  files('aubinator.c', 'intel_aub.h'),
   dependencies : [dep_expat, dep_zlib, dep_dl, dep_thread, dep_m],
   include_directories : [inc_common, inc_intel],
   link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util],
@@ -32,8 +31,7 @@ aubinator = executable(
 
 aubinator_error_decode = executable(
   'aubinator_error_decode',
-  files('aubinator_error_decode.c', 'disasm.c', 'gen_disasm.h',
-        'gen_batch_decoder.c'),
+  files('aubinator_error_decode.c'),
   dependencies : [dep_zlib, dep_thread],
   include_directories : [inc_common, inc_intel],
   link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util],




More information about the mesa-commit mailing list