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.
This commit is contained in:
Benjamin Otte 2024-01-07 14:34:04 +01:00
parent 543c7ae52a
commit ed12c0cd5a
3 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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'

View File

@ -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',