diff options
author | Eric Engestrom <eric@igalia.com> | 2022-11-03 10:13:16 +0000 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-02-23 09:42:46 +0000 |
commit | f059213f5dd510c22b1e0af102be6984aa715038 (patch) | |
tree | 01e2091cc20fff6405dceef581b6bb055a38c2f5 | |
parent | 22c1f4be8c16a60017bc6a740c488c77129989ae (diff) | |
download | mesa-f059213f5dd510c22b1e0af102be6984aa715038.tar.gz |
meson: reuse vulkan_wsi_list for defining vk_wsi_args
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19497>
-rw-r--r-- | meson.build | 24 | ||||
-rw-r--r-- | src/vulkan/meson.build | 20 |
2 files changed, 16 insertions, 28 deletions
diff --git a/meson.build b/meson.build index 621f0675489..4fe0dd6d036 100644 --- a/meson.build +++ b/meson.build @@ -376,30 +376,6 @@ with_xlib_lease = get_option('xlib-lease') \ .require(with_platform_x11 and system_has_kms_drm, error_message : 'xlib-lease requires X11 and KMS/DRM support') \ .allowed() -vk_wsi_args = [] - -if with_platform_wayland - vk_wsi_args += '-DVK_USE_PLATFORM_WAYLAND_KHR' -endif -if with_platform_x11 - vk_wsi_args += ['-DVK_USE_PLATFORM_XCB_KHR', '-DVK_USE_PLATFORM_XLIB_KHR'] -endif -if with_platform_windows - vk_wsi_args += '-DVK_USE_PLATFORM_WIN32_KHR' -endif -if with_platform_android - vk_wsi_args += '-DVK_USE_PLATFORM_ANDROID_KHR' -endif -if with_xlib_lease - vk_wsi_args += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT' -endif -if system_has_kms_drm and not with_platform_android - vk_wsi_args += '-DVK_USE_PLATFORM_DISPLAY_KHR' -endif -if host_machine.system() == 'darwin' - vk_wsi_args += ['-DVK_USE_PLATFORM_MACOS_MVK', '-DVK_USE_PLATFORM_METAL_EXT'] -endif - with_egl = get_option('egl') \ .require(host_machine.system() != 'darwin', error_message : 'EGL not supported on MacOS') \ .require(with_platform_windows or with_platform_haiku or with_dri or with_platform_android, error_message : 'EGL requires DRI, Haiku, Windows or Android') \ diff --git a/src/vulkan/meson.build b/src/vulkan/meson.build index 6a95768c5e8..aa5addcfce7 100644 --- a/src/vulkan/meson.build +++ b/src/vulkan/meson.build @@ -45,21 +45,33 @@ if with_platform_x11 dep_xcb_shm, dep_xshmfence, ] - vulkan_wsi_list += ['xcb', 'x11'] + vulkan_wsi_list += '-DVK_USE_PLATFORM_XCB_KHR' + vulkan_wsi_list += '-DVK_USE_PLATFORM_XLIB_KHR' endif if with_platform_wayland vulkan_wsi_deps += dep_wayland_client - vulkan_wsi_list += ['wayland'] + vulkan_wsi_list += '-DVK_USE_PLATFORM_WAYLAND_KHR' endif if system_has_kms_drm and not with_platform_android vulkan_wsi_deps += [dep_libdrm] - vulkan_wsi_list += ['drm'] + vulkan_wsi_list += '-DVK_USE_PLATFORM_DISPLAY_KHR' endif if with_xlib_lease vulkan_wsi_deps += [dep_xlib_xrandr] - vulkan_wsi_list += ['xlib_xrandr'] + vulkan_wsi_list += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT' +endif +if with_platform_android + vulkan_wsi_list += '-DVK_USE_PLATFORM_ANDROID_KHR' +endif +if with_platform_windows + vulkan_wsi_list += '-DVK_USE_PLATFORM_WIN32_KHR' +endif +if host_machine.system() == 'darwin' + vulkan_wsi_list += '-DVK_USE_PLATFORM_MACOS_MVK' + vulkan_wsi_list += '-DVK_USE_PLATFORM_METAL_EXT' endif +vk_wsi_args = vulkan_wsi_list subdir('util') subdir('runtime') |