libamd_common = static_library(
'amd_common',
- [amd_common_files, sid_tables_h, nir_opcodes_h],
+ [amd_common_files, sid_tables_h],
include_directories : [
- inc_common, inc_compiler, inc_nir, inc_mesa, inc_mapi, inc_amd,
+ inc_common, inc_compiler, inc_mesa, inc_mapi, inc_amd,
],
dependencies : [
dep_llvm, dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind,
+ idep_nir_headers,
],
c_args : [c_vis_args],
cpp_args : [cpp_vis_args],
libvulkan_radeon = shared_library(
'vulkan_radeon',
- [libradv_files, radv_entrypoints, radv_extensions_c, nir_opcodes_h,
- vk_format_table_c],
+ [libradv_files, radv_entrypoints, radv_extensions_c, vk_format_table_c],
include_directories : [
inc_common, inc_amd, inc_amd_common, inc_compiler, inc_vulkan_util,
inc_vulkan_wsi,
],
link_with : [
- libamd_common, libamdgpu_addrlib, libvulkan_util, libvulkan_wsi, libnir,
+ libamd_common, libamdgpu_addrlib, libvulkan_util, libvulkan_wsi,
libmesa_util,
],
dependencies : [
dep_llvm, dep_libdrm_amdgpu, dep_thread, dep_elf, dep_dl, dep_m,
dep_valgrind,
+ idep_nir,
],
c_args : [c_vis_args, no_override_init_args, radv_flags],
link_args : [ld_args_bsymbolic, ld_args_gc_sections],
)
libbroadcom_compiler = static_library(
- ['broadcom_compiler', v3d_xml_pack, nir_opcodes_h, nir_builder_opcodes_h],
+ ['broadcom_compiler', v3d_xml_pack],
libbroadcom_compiler_files,
include_directories : [inc_common, inc_broadcom],
c_args : [c_vis_args, no_override_init_args],
- dependencies : [dep_libdrm, dep_valgrind],
+ dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers],
build_by_default : false,
)
ir_expression_operation_strings_h, ir_expression_operation_constant_h],
c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
- link_with : [libnir, libglcpp],
+ link_with : libglcpp,
include_directories : [inc_common, inc_compiler, inc_nir],
+ dependencies : idep_nir,
build_by_default : false,
)
spirv2nir = executable(
'spirv2nir',
[files('spirv/spirv2nir.c'), dummy_cpp],
- dependencies : [dep_m, dep_thread],
+ dependencies : [dep_m, dep_thread, idep_nir],
include_directories : [inc_common, inc_nir, include_directories('spirv')],
- link_with : [libnir, libmesa_util],
+ link_with : libmesa_util,
c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
build_by_default : false,
)
build_by_default : false,
)
+# Headers-only dependency
+idep_nir_headers = declare_dependency(
+ sources : [nir_opcodes_h, nir_builder_opcodes_h],
+ include_directories : include_directories('.'),
+)
+
+# Also link with nir
+idep_nir = declare_dependency(
+ dependencies : idep_nir_headers,
+ link_with : libnir,
+)
+
nir_algebraic_py = files('nir_algebraic.py')
if with_tests
'nir_control_flow',
executable(
'nir_control_flow_test',
- [files('tests/control_flow_tests.cpp'), nir_opcodes_h],
+ files('tests/control_flow_tests.cpp'),
c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
include_directories : [inc_common],
- dependencies : [dep_thread, idep_gtest],
- link_with : [libmesa_util, libnir],
+ dependencies : [dep_thread, idep_gtest, idep_nir],
+ link_with : libmesa_util,
)
)
endif
libgallium = static_library(
'gallium',
- [files_libgallium, u_indices_gen_c, u_unfilled_gen_c, u_format_table_c,
- nir_opcodes_h, nir_builder_opcodes_h],
+ [files_libgallium, u_indices_gen_c, u_unfilled_gen_c, u_format_table_c],
include_directories : [
inc_loader, inc_gallium, inc_src, inc_include, include_directories('util')
],
c_args : [c_vis_args, c_msvc_compat_args],
cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
- dependencies : [dep_libdrm, dep_llvm, dep_unwind, dep_dl, dep_m, dep_thread],
+ dependencies : [
+ dep_libdrm, dep_llvm, dep_unwind, dep_dl, dep_m, dep_thread,
+ idep_nir_headers,
+ ],
build_by_default : false,
)
)
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')
]
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(
dep_libdrm_freedreno,
dep_thread,
dep_lmsensors,
+ idep_nir,
],
link_with : [
libfreedreno,
libgallium,
- libnir,
libglsl_standalone,
libmesa_util,
],
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(
sources : si_driinfo_h,
link_with : [
libradeonsi, libradeon, libradeonwinsys, libamdgpuwinsys, libamd_common,
- libnir,
],
+ dependencies : idep_nir,
)
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,
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,
)
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,
)
inc_common, inc_util, inc_gallium_winsys, inc_gallium_drivers,
],
link_with : [
- libxa_st, libgalliumvl_stub, libgallium, libmesa_util, libnir,
+ libxa_st, libgalliumvl_stub, libgallium, libmesa_util,
libpipe_loader_static, libws_null, libwsw,
],
link_depends : xa_link_depends,
libblorp = static_library(
'blorp',
- [files_libblorp, nir_opcodes_h],
+ files_libblorp,
include_directories : [inc_common, inc_intel],
c_args : [c_vis_args, no_override_init_args],
+ dependencies : idep_nir_headers,
)
libintel_compiler = static_library(
'intel_compiler',
- [libintel_compiler_files, brw_nir_trig, nir_opcodes_h, nir_builder_opcodes_h,
- ir_expression_operation_h],
- include_directories : [inc_common, inc_intel, inc_nir],
+ [libintel_compiler_files, brw_nir_trig, ir_expression_operation_h],
+ include_directories : [inc_common, inc_intel],
c_args : [c_vis_args, no_override_init_args],
cpp_args : [cpp_vis_args],
+ dependencies : idep_nir_headers,
build_by_default : false,
)
test(
t,
executable(
- [t, nir_opcodes_h, ir_expression_operation_h],
+ [t, ir_expression_operation_h],
'test_@0@.cpp'.format(t),
include_directories : [inc_common, inc_intel],
link_with : [
- libintel_compiler, libintel_common, libnir, libmesa_util, libisl,
+ libintel_compiler, libintel_common, libmesa_util, libisl,
],
- dependencies : [dep_thread, dep_dl, idep_gtest],
+ dependencies : [dep_thread, dep_dl, idep_gtest, idep_nir],
)
)
endforeach
c_vis_args, no_override_init_args, '-msse2',
'-DGEN_VERSIONx10=@0@'.format(_gen),
],
- dependencies : [dep_libdrm, dep_valgrind],
+ dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers],
)
endforeach
libanv_common = static_library(
'anv_common',
- [libanv_files, anv_entrypoints, anv_extensions_c, nir_opcodes_h],
+ [libanv_files, anv_entrypoints, anv_extensions_c],
include_directories : [
inc_common, inc_intel, inc_compiler, inc_drm_uapi, inc_vulkan_util,
inc_vulkan_wsi,
],
c_args : [c_vis_args, no_override_init_args, '-msse2', anv_flags],
- dependencies : [dep_valgrind, anv_deps, dep_libdrm],
+ dependencies : [dep_valgrind, anv_deps, dep_libdrm, idep_nir_headers],
)
libvulkan_intel = shared_library(
link_whole : [libanv_common, libanv_gen_libs],
link_with : [
libintel_compiler, libintel_common, libisl, libblorp, libvulkan_util,
- libvulkan_wsi, libnir, libmesa_util,
+ libvulkan_wsi, libmesa_util,
+ ],
+ dependencies : [
+ dep_libdrm, dep_thread, dep_dl, dep_m, anv_deps, dep_valgrind, idep_nir,
],
- dependencies : [dep_libdrm, dep_thread, dep_dl, dep_m, anv_deps, dep_valgrind],
c_args : [c_vis_args, no_override_init_args, '-msse2', anv_flags],
link_args : ['-Wl,--build-id=sha1', ld_args_bsymbolic, ld_args_gc_sections],
install : true,
foreach v : ['40', '45', '50', '60', '70', '75', '80', '90', '100']
i965_gen_libs += static_library(
'libi965_gen@0@'.format(v),
- ['genX_blorp_exec.c', 'genX_state_upload.c', nir_opcodes_h, gen_xml_pack],
+ ['genX_blorp_exec.c', 'genX_state_upload.c', gen_xml_pack],
include_directories : [inc_common, inc_intel, inc_dri_common],
c_args : [
c_vis_args, no_override_init_args, '-msse2',
'-DGEN_VERSIONx10=@0@'.format(v),
],
- dependencies : [dep_libdrm],
+ dependencies : [dep_libdrm, idep_nir_headers],
)
endforeach
libi965 = static_library(
'i965',
- [files_i965, i965_oa_sources, nir_opcodes_h, ir_expression_operation_h,
+ [files_i965, i965_oa_sources, ir_expression_operation_h,
xmlpool_options_h],
include_directories : [
- inc_common, inc_intel, inc_dri_common, inc_util, inc_drm_uapi, inc_nir,
+ inc_common, inc_intel, inc_dri_common, inc_util, inc_drm_uapi,
],
c_args : [c_vis_args, no_override_init_args, '-msse2'],
cpp_args : [cpp_vis_args, '-msse2'],
link_with : [
i965_gen_libs, libintel_common, libisl, libintel_compiler, libblorp,
],
- dependencies : [dep_libdrm, dep_valgrind],
+ dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers],
)
dri_drivers += libi965
link_whole : dri_drivers,
link_with : [
libmegadriver_stub, libdricommon, libxmlconfig, libglapi, libmesa_util,
- libnir, libmesa_classic,
+ libmesa_classic,
],
dependencies : [
- dep_selinux, dep_libdrm, dep_expat, dep_m, dep_thread, dep_dl,
+ dep_selinux, dep_libdrm, dep_expat, dep_m, dep_thread, dep_dl, idep_nir,
],
link_args : ['-Wl,--build-id=sha1', ld_args_bsymbolic, ld_args_gc_sections],
)
main_marshal_generated_h,
main_dispatch_h,
ir_expression_operation_h,
- nir_opcodes_h,
main_remap_helper_h,
matypes_h,
sha1_h,
cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
include_directories : [inc_common, include_directories('main')],
link_with : [libglsl, libmesa_sse41],
+ dependencies : idep_nir_headers,
build_by_default : false,
)
cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
include_directories : [inc_common, include_directories('main')],
link_with : [libglsl, libmesa_sse41],
+ dependencies : idep_nir_headers,
build_by_default : false,
)