From 1e29a1a8c5dd4818746b6938e65ba17808832567 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sun, 9 Oct 2022 17:39:44 +0300 Subject: [PATCH] anv: add grl build dependency on entrypoints Signed-off-by: Lionel Landwerlin Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7446 Fixes: f3ddfd81b4de ("anv: Build BVHs on the GPU with GRL") Reviewed-by: Ivan Briano Part-of: --- src/intel/vulkan/grl/meson.build | 6 +++--- src/intel/vulkan/meson.build | 25 +++++++++++++++---------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/intel/vulkan/grl/meson.build b/src/intel/vulkan/grl/meson.build index 1230ba82935..b50bd8459b3 100644 --- a/src/intel/vulkan/grl/meson.build +++ b/src/intel/vulkan/grl/meson.build @@ -155,7 +155,7 @@ foreach t : [['125', 'gfx125', 'dg2']] grl_genX_files, grl_metakernel_c, grl_metakernel_h], include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_compiler, - inc_intel, inc_anv, + inc_intel, ], c_args : [ no_override_init_args, c_sse2_args, @@ -167,7 +167,7 @@ foreach t : [['125', 'gfx125', 'dg2']] ], dependencies : [ dep_valgrind, idep_nir_headers, idep_vulkan_util_headers, idep_vulkan_wsi_headers, - idep_vulkan_runtime_headers, + idep_vulkan_runtime_headers, idep_anv_headers, ], gnu_symbol_visibility : 'hidden', ) @@ -188,7 +188,7 @@ libgrl = static_library( inc_compiler, ], link_whole : [grl_genX_libs], - dependencies : libgrl_deps, + dependencies : [libgrl_deps, idep_anv_headers], install : true, ) idep_grl = declare_dependency( diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build index b0277572025..3f8342b5bbf 100644 --- a/src/intel/vulkan/meson.build +++ b/src/intel/vulkan/meson.build @@ -27,16 +27,6 @@ anv_flags = [ anv_cpp_flags = [] -if with_intel_vk_rt - subdir('grl') - optional_libgrl = [libgrl] - anv_flags += '-DANV_SUPPORT_RT=1' -else - idep_grl = null_dep - optional_libgrl = [] - anv_flags += '-DANV_SUPPORT_RT=0' -endif - anv_entrypoints = custom_target( 'anv_entrypoints', input : [vk_entrypoints_gen, vk_api_xml], @@ -52,6 +42,21 @@ anv_entrypoints = custom_target( depend_files : vk_entrypoints_gen_depend_files, ) +idep_anv_headers = declare_dependency( + sources : [anv_entrypoints[0]], + include_directories : inc_anv, +) + +if with_intel_vk_rt + subdir('grl') + optional_libgrl = [libgrl] + anv_flags += '-DANV_SUPPORT_RT=1' +else + idep_grl = null_dep + optional_libgrl = [] + anv_flags += '-DANV_SUPPORT_RT=0' +endif + intel_icd = custom_target( 'intel_icd', input : [vk_icd_gen, vk_api_xml],