From ed12c0cd5ab7682af88665ad8b8ee811b265d19f Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 7 Jan 2024 14:34:04 +0100 Subject: [PATCH] build: Enable Vulkan by default It's still possible to disable via -Dvulkan=disabled We force-disable it on Mac OS. I don't know how to best handle it on Windows. Technically we don't need it, because the Vulkan stuff we want is about dmabufs, but I have no idea how to convince the build system to toggle the default to "disabled" on Windows, so it has to stay enabled for now. --- .gitlab-ci/test-msvc.bat | 2 +- meson.build | 6 ++++-- meson_options.txt | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index 89255b25b9..ff6b085366 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -6,7 +6,7 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliar :: FIXME: make warnings fatal pip3 install --upgrade --user meson~=0.64 || goto :error -meson setup -Dbackend_max_links=1 -Ddebug=false -Dmedia-gstreamer=disabled _build || goto :error +meson setup -Dbackend_max_links=1 -Ddebug=false -Dmedia-gstreamer=disabled -Dvulkan=disabled _build || goto :error ninja -C _build || goto :error goto :EOF diff --git a/meson.build b/meson.build index 1ea481dd5c..a9663e501c 100644 --- a/meson.build +++ b/meson.build @@ -101,6 +101,7 @@ wayland_enabled = get_option('wayland-backend') broadway_enabled = get_option('broadway-backend') macos_enabled = get_option('macos-backend') win32_enabled = get_option('win32-backend') +vulkan_enabled = get_option('vulkan') os_unix = false os_linux = false @@ -122,6 +123,7 @@ os_unix = not os_win32 if os_darwin wayland_enabled = false + vulkan_enabled = false else macos_enabled = false endif @@ -616,8 +618,8 @@ endif # be reported upstream and fixed. vulkan_dep = dependency('vulkan', version: vulkan_req, - required: get_option('vulkan')) -glslc = find_program('glslc', required: get_option('vulkan')) + required: vulkan_enabled) +glslc = find_program('glslc', required: vulkan_enabled) if vulkan_dep.found() have_vulkan = true vulkan_pkg_found = vulkan_dep.type_name() == 'pkgconfig' diff --git a/meson_options.txt b/meson_options.txt index 4b794e7814..3b2cb8ad37 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -55,8 +55,8 @@ option('print-cups', option('vulkan', type: 'feature', - value: 'disabled', - description : 'Enable support for the experimental Vulkan renderer') + value: 'enabled', + description : 'Enable Vulkan support including the Vulkan renderer') option('cloudproviders', type: 'feature',