X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=meson.build;h=011b1eca83215b2e7f69e986f20c178f5c6e8d3d;hb=9c6fa9421d57394600fbeade7a2ceb3e264bd108;hp=c9b4e366ea335a4fe6eda8a7540704ff30aa16da;hpb=60ad006b27e1e577e29636e56178523893051968;p=mesa.git diff --git a/meson.build b/meson.build index c9b4e366ea3..011b1eca832 100644 --- a/meson.build +++ b/meson.build @@ -51,6 +51,7 @@ pre_args = [ with_vulkan_icd_dir = get_option('vulkan-icd-dir') with_tests = get_option('build-tests') +with_aco_tests = get_option('build-aco-tests') with_glx_read_only_text = get_option('glx-read-only-text') with_glx_direct = get_option('glx-direct') with_osmesa = get_option('osmesa') @@ -275,6 +276,9 @@ endif if with_gallium_tegra and not with_gallium_nouveau error('tegra driver requires nouveau driver') endif +if with_aco_tests and not with_amd_vk + error('ACO tests require Radv') +endif if host_machine.system() == 'darwin' with_dri_platform = 'apple' @@ -293,7 +297,7 @@ endif _platforms = get_option('platforms') if _platforms.contains('auto') if system_has_kms_drm - _platforms = ['x11', 'wayland', 'drm'] + _platforms = ['x11', 'wayland'] elif ['darwin', 'cygwin'].contains(host_machine.system()) _platforms = ['x11'] elif ['haiku'].contains(host_machine.system()) @@ -309,7 +313,6 @@ endif with_platform_android = _platforms.contains('android') with_platform_x11 = _platforms.contains('x11') with_platform_wayland = _platforms.contains('wayland') -with_platform_drm = _platforms.contains('drm') with_platform_haiku = _platforms.contains('haiku') with_platform_windows = _platforms.contains('windows') @@ -317,6 +320,10 @@ if _platforms.contains('surfaceless') warning('Platform `surfaceless` is now always selected; setting this option will be an error in Mesa 20.3') endif +if _platforms.contains('drm') + warning('Platform `drm` is now automatically selected; setting this option will be an error in Mesa 20.3') +endif + if _platforms.length() != 0 egl_native_platform = _platforms[0] else @@ -382,7 +389,7 @@ elif _xlib_lease == 'false' warning('xlib_lease option "false" deprecated, please use "disabled" instead.') endif if _xlib_lease == 'auto' - with_xlib_lease = with_platform_x11 and with_platform_drm + with_xlib_lease = with_platform_x11 and with_gbm else with_xlib_lease = _xlib_lease == 'enabled' endif @@ -536,6 +543,10 @@ if with_gallium_zink dep_vulkan = dependency('vulkan') endif +if with_vulkan_overlay_layer or with_aco_tests + prog_glslang = find_program('glslangValidator') +endif + _xvmc = get_option('gallium-xvmc') if _xvmc == 'true' _xvmc = 'enabled' @@ -822,10 +833,7 @@ else pre_args += '-DEGL_NO_X11' gl_pkgconfig_c_flags += '-DEGL_NO_X11' endif -if with_platform_drm - if with_egl and not with_gbm - error('EGL drm platform requires gbm') - endif +if with_gbm pre_args += '-DHAVE_DRM_PLATFORM' endif if with_platform_android @@ -1355,7 +1363,7 @@ dep_libdrm_intel = null_dep _drm_amdgpu_ver = '2.4.100' _drm_radeon_ver = '2.4.71' -_drm_nouveau_ver = '2.4.66' +_drm_nouveau_ver = '2.4.102' _drm_intel_ver = '2.4.75' _drm_ver = '2.4.81' @@ -1757,6 +1765,19 @@ else dep_lmsensors = null_dep endif +# If the compiler supports it, put function and data symbols in their +# own sections and GC the sections after linking. This lets drivers +# drop shared code unused by that specific driver (particularly +# relevant for Vulkan drivers). +if cc.has_link_argument('-Wl,--gc-sections') + add_project_arguments('-Wl,--gc-sections', language : ['c', 'cpp']) + foreach a: ['-ffunction-sections', '-fdata-sections'] + if cc.has_argument(a) + add_project_arguments(a, language : ['c', 'cpp']) + endif + endforeach +endif + foreach a : pre_args add_project_arguments(a, language : ['c', 'cpp']) endforeach @@ -1881,6 +1902,9 @@ endif lines += 'GBM: ' + (with_gbm ? 'yes' : 'no') if with_egl or with_any_vk _platforms += 'surfaceless' + if with_gbm + _platforms += 'drm' + endif lines += 'EGL/Vulkan/VL platforms: ' + ' '.join(_platforms) endif