diff --git a/src/gallium/meson.build b/src/gallium/meson.build index e1bcad455f8..3a4625dc520 100644 --- a/src/gallium/meson.build +++ b/src/gallium/meson.build @@ -201,6 +201,17 @@ if with_gallium_rusticl subdir('frontends/rusticl') subdir('targets/rusticl') endif +if with_glx == 'xlib' + subdir('winsys/sw/xlib') + subdir('frontends/glx/xlib') + subdir('targets/libgl-xlib') +endif +if with_gallium_va + subdir('frontends/va') + if not with_dri + subdir('targets/va') + endif +endif if with_dri subdir('frontends/dri') subdir('targets/dri') @@ -209,19 +220,10 @@ if with_osmesa subdir('frontends/osmesa') subdir('targets/osmesa') endif -if with_glx == 'xlib' - subdir('winsys/sw/xlib') - subdir('frontends/glx/xlib') - subdir('targets/libgl-xlib') -endif if with_gallium_vdpau subdir('frontends/vdpau') subdir('targets/vdpau') endif -if with_gallium_va - subdir('frontends/va') - subdir('targets/va') -endif if with_gallium_xa subdir('frontends/xa') subdir('targets/xa') diff --git a/src/gallium/targets/dri/dri.sym.in b/src/gallium/targets/dri/dri.sym.in index 3bc01424171..e3a5211ce4f 100644 --- a/src/gallium/targets/dri/dri.sym.in +++ b/src/gallium/targets/dri/dri.sym.in @@ -70,6 +70,7 @@ @amdgpu_winsys_create@ @fd_drm_screen_create_renderonly@ @ac_init_shared_llvm_once@ + @va_driver_init@ local: *; }; diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build index 1bc7a98faca..13e01d602c4 100644 --- a/src/gallium/targets/dri/meson.build +++ b/src/gallium/targets/dri/meson.build @@ -10,6 +10,14 @@ gallium_dri_c_args = [] gallium_dri_ld_args = [cc.get_supported_link_arguments('-Wl,--default-symver')] gallium_dri_link_depends = [] gallium_dri_drivers = [] +gallium_dri_link_with = [] +gallium_dri_link_whole = [] + +if with_gallium_va + gallium_dri_link_with += [libgalliumvlwinsys] + gallium_dri_link_whole += [libva_st] + sym_config.set('va_driver_init', '__vaDriverInit_*_*;') +endif dri_sym = configure_file(input : 'dri.sym.in', output : 'dri.sym', configuration : sym_config) @@ -41,9 +49,9 @@ libgallium_dri = shared_library( link_with : [ libmesa, libgalliumvl, libgallium, libglapi, libpipe_loader_static, libws_null, libwsw, libswdri, - libswkmsdri, + libswkmsdri, gallium_dri_link_with ], - link_whole : [libdri], + link_whole : [libdri, gallium_dri_link_whole], dependencies : [ dep_selinux, dep_libdrm, dep_llvm, dep_thread, idep_xmlconfig, idep_mesautil, driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau, @@ -55,3 +63,27 @@ libgallium_dri = shared_library( install : true, name_suffix : 'so', ) + +if with_gallium_va + va_drivers = [] + foreach d : [[with_gallium_r600, 'r600'], + [with_gallium_radeonsi, 'radeonsi'], + [with_gallium_nouveau, 'nouveau'], + [with_gallium_virgl, 'virtio_gpu'], + [with_gallium_d3d12_video, 'd3d12']] + if d[0] + va_drivers += '@0@_drv_video.so'.format(d[1]) + endif + endforeach + + if va_drivers.length() > 0 + meson.add_install_script( + install_megadrivers_py.full_path(), + libgallium_dri.full_path(), + va_drivers_path, + va_drivers, + '--megadriver_libdir', get_option('libdir'), + install_tag : 'runtime', + ) + endif +endif