1# Copyright © 2017-2018 Intel Corporation 2# SPDX-License-Identifier: MIT 3 4pipe_loader_link_args = [ld_args_gc_sections, ld_args_build_id] 5pipe_loader_link_deps = [] 6pipe_loader_link_with = [libgallium, libgalliumvl_stub] 7pipe_loader_comp_args = [] 8pipe_loader_incs = [ 9 inc_include, inc_src, inc_util, inc_gallium, inc_gallium_drivers, 10 inc_gallium_winsys, inc_gallium_aux, 11] 12 13if (with_gallium_va or with_gallium_vdpau) 14 pipe_loader_link_with += libgalliumvlwinsys 15endif 16 17pipe_loader_install_dir = join_paths(get_option('libdir'), 'gallium-pipe') 18 19_kmsro_targets = [ 20 driver_kmsro, driver_v3d, driver_vc4, driver_freedreno, driver_etnaviv, 21 driver_panfrost, driver_lima, driver_asahi, 22] 23 24if with_gallium_v3d 25 _kmsro_targets += [idep_xmlconfig, dep_expat] 26endif 27 28pipe_loaders = [ 29 [with_gallium_i915, 'i915', driver_i915, []], 30 [with_gallium_crocus, 'crocus', [driver_crocus, idep_xmlconfig], []], 31 [with_gallium_iris, 'iris', [driver_iris, idep_xmlconfig], []], 32 [with_gallium_nouveau, 'nouveau', driver_nouveau, []], 33 [with_gallium_r300, 'r300', driver_r300, []], 34 [with_gallium_r600, 'r600', driver_r600, []], 35 [with_gallium_radeonsi, 'radeonsi', [driver_radeonsi, idep_xmlconfig], []], 36 [with_gallium_freedreno, 'msm', driver_freedreno, []], 37 [with_gallium_kmsro, 'kmsro', _kmsro_targets, [libpipe_loader_dynamic]], 38 [with_gallium_svga, 'vmwgfx', driver_svga, []], 39 [with_gallium_swrast, 'swrast', driver_swrast, [libwsw, libws_null, libswdri, libswkmsdri]], 40] 41 42foreach x : pipe_loaders 43 if not x[0] 44 continue 45 endif 46 47 pipe_sym_config = configuration_data() 48 49 foreach d : [[x[1] in ['r300', 'r600', 'radeonsi'], 'radeon_drm_winsys_create'], 50 [x[1] == 'radeonsi', 'amdgpu_winsys_create'], 51 [x[1] == 'radeonsi' and amd_with_llvm, 'ac_init_shared_llvm_once'], 52 [x[1] != 'swrast', 'driver_descriptor'], 53 [x[1] == 'swrast', 'swrast_driver_descriptor']] 54 if d[0] 55 pipe_sym_config.set(d[1], d[1] + ';') 56 else 57 pipe_sym_config.set(d[1], '') 58 endif 59 endforeach 60 61 pipe_sym = configure_file(input : 'pipe.sym.in', output : 'pipe_@[email protected]'.format(x[1]), configuration : pipe_sym_config) 62 63 cur_pipe_loader_link_args = pipe_loader_link_args 64 cur_pipe_loader_link_deps = pipe_loader_link_deps 65 if with_ld_version_script 66 cur_pipe_loader_link_args += [ 67 '-Wl,--version-script', join_paths(meson.current_build_dir(), 'pipe_@[email protected]'.format(x[1])) 68 ] 69 cur_pipe_loader_link_deps += pipe_sym 70 endif 71 72 shared_library( 73 'pipe_@0@'.format(x[1]), 74 'pipe_@[email protected]'.format(x[1]), 75 c_args : [pipe_loader_comp_args, '-DPIPE_LOADER_DYNAMIC=1'], 76 cpp_args : [pipe_loader_comp_args], 77 gnu_symbol_visibility : 'hidden', 78 link_args : cur_pipe_loader_link_args, 79 link_depends : cur_pipe_loader_link_deps, 80 include_directories : pipe_loader_incs, 81 link_with : [pipe_loader_link_with, x[3]], 82 dependencies : [idep_mesautil, idep_nir, dep_thread, x[2]], 83 name_prefix : '', 84 install : true, 85 install_dir : pipe_loader_install_dir, 86 ) 87endforeach 88