summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2017-12-12 12:22:56 -0800
committerDylan Baker <[email protected]>2018-01-11 15:40:02 -0800
commit2083a14179eb04d22feebc5751a1a145828d07cf (patch)
tree0fa3d2d540621d00faa6daf0c132aa5127f2dab0 /src/gallium/drivers
parent60856a7b4982aaaa4f22a002878d5d78cd63e272 (diff)
meson: Use dependencies for nir
This creates two new internal dependencies, idep_nir_headers and idep_nir. The former encapsulates the generation of nir_opcodes.h and nir_builder_opcodes.h and adding src/compiler/nir as an include path. This ensures that any target that needs nir headers will have the includes and that the generated headers will be generated before the target is build. The second, idep_nir, includes the first and additionally links to libnir. This is intended to make it easier to avoid race conditions in the build when using nir, since the number of consumers for libnir and it's headers are quite high. Acked-by: Eric Engestrom <[email protected]> Signed-off-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/meson.build8
-rw-r--r--src/gallium/drivers/radeonsi/meson.build6
-rw-r--r--src/gallium/drivers/vc4/meson.build7
-rw-r--r--src/gallium/drivers/vc5/meson.build7
4 files changed, 15 insertions, 13 deletions
diff --git a/src/gallium/drivers/freedreno/meson.build b/src/gallium/drivers/freedreno/meson.build
index af288ced1a8..23c85cfa71b 100644
--- a/src/gallium/drivers/freedreno/meson.build
+++ b/src/gallium/drivers/freedreno/meson.build
@@ -203,7 +203,7 @@ files_libfreedreno = files(
)
freedreno_includes = [
- inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_nir,
+ inc_src, inc_include, inc_gallium, inc_gallium_aux,
include_directories('ir3')
]
@@ -219,11 +219,11 @@ endif
libfreedreno = static_library(
'freedreno',
- [files_libfreedreno, ir3_nir_trig_c, nir_opcodes_h],
+ [files_libfreedreno, ir3_nir_trig_c],
include_directories : freedreno_includes,
c_args : [freedreno_c_args, c_vis_args],
cpp_args : [freedreno_cpp_args, cpp_vis_args],
- dependencies : [dep_libdrm, dep_libdrm_freedreno],
+ dependencies : [dep_libdrm, dep_libdrm_freedreno, idep_nir_headers],
)
driver_freedreno = declare_dependency(
@@ -240,11 +240,11 @@ ir3_compiler = executable(
dep_libdrm_freedreno,
dep_thread,
dep_lmsensors,
+ idep_nir,
],
link_with : [
libfreedreno,
libgallium,
- libnir,
libglsl_standalone,
libmesa_util,
],
diff --git a/src/gallium/drivers/radeonsi/meson.build b/src/gallium/drivers/radeonsi/meson.build
index 58132bf0720..97c7a412444 100644
--- a/src/gallium/drivers/radeonsi/meson.build
+++ b/src/gallium/drivers/radeonsi/meson.build
@@ -70,14 +70,14 @@ si_driinfo_h = custom_target(
libradeonsi = static_library(
'radeonsi',
- [files_libradeonsi, si_driinfo_h, nir_opcodes_h, sid_tables_h],
+ [files_libradeonsi, si_driinfo_h, sid_tables_h],
include_directories : [
inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common,
inc_gallium_drivers,
],
c_args : [c_vis_args],
cpp_args : [cpp_vis_args],
- dependencies : dep_llvm,
+ dependencies : [dep_llvm, idep_nir_headers],
)
driver_radeonsi = declare_dependency(
@@ -85,6 +85,6 @@ driver_radeonsi = declare_dependency(
sources : si_driinfo_h,
link_with : [
libradeonsi, libradeon, libradeonwinsys, libamdgpuwinsys, libamd_common,
- libnir,
],
+ dependencies : idep_nir,
)
diff --git a/src/gallium/drivers/vc4/meson.build b/src/gallium/drivers/vc4/meson.build
index 9b816cc8fd5..ef7e7bcac5c 100644
--- a/src/gallium/drivers/vc4/meson.build
+++ b/src/gallium/drivers/vc4/meson.build
@@ -101,7 +101,7 @@ endif
libvc4 = static_library(
'vc4',
- [files_libvc4, v3d_xml_pack, nir_opcodes_h, nir_builder_opcodes_h],
+ [files_libvc4, v3d_xml_pack],
include_directories : [
inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom,
inc_gallium_drivers, inc_drm_uapi,
@@ -109,11 +109,12 @@ libvc4 = static_library(
link_with: libvc4_neon,
c_args : [c_vis_args, simpenrose_c_args],
cpp_args : [cpp_vis_args],
- dependencies : [dep_simpenrose, dep_libdrm, dep_valgrind],
+ dependencies : [dep_simpenrose, dep_libdrm, dep_valgrind, idep_nir_headers],
build_by_default : false,
)
driver_vc4 = declare_dependency(
compile_args : '-DGALLIUM_VC4',
- link_with : [libvc4, libvc4winsys, libbroadcom_cle, libnir],
+ link_with : [libvc4, libvc4winsys, libbroadcom_cle],
+ dependencies : idep_nir,
)
diff --git a/src/gallium/drivers/vc5/meson.build b/src/gallium/drivers/vc5/meson.build
index ee7fe9dc83c..deaa81fdb9d 100644
--- a/src/gallium/drivers/vc5/meson.build
+++ b/src/gallium/drivers/vc5/meson.build
@@ -54,17 +54,18 @@ endif
libvc5 = static_library(
'vc5',
- [files_libvc5, v3d_xml_pack, nir_opcodes_h, nir_builder_opcodes_h],
+ [files_libvc5, v3d_xml_pack],
include_directories : [
inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom,
inc_gallium_drivers, inc_drm_uapi,
],
c_args : [c_vis_args, v3dv3_c_args],
cpp_args : [cpp_vis_args, v3dv3_c_args],
- dependencies : [dep_v3dv3, dep_libdrm, dep_valgrind],
+ dependencies : [dep_v3dv3, dep_libdrm, dep_valgrind, idep_nir_headers],
)
driver_vc5 = declare_dependency(
compile_args : '-DGALLIUM_VC5',
- link_with : [libvc5, libvc5winsys, libbroadcom_cle, libbroadcom_vc5, libnir],
+ link_with : [libvc5, libvc5winsys, libbroadcom_cle, libbroadcom_vc5],
+ dependencies : idep_nir,
)