meson: use a feature option for gallium-va
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
This commit is contained in:
@@ -652,7 +652,7 @@ debian-mingw32-x86_64:
|
|||||||
-D microsoft-clc=enabled
|
-D microsoft-clc=enabled
|
||||||
-D static-libclc=all
|
-D static-libclc=all
|
||||||
-D llvm=enabled
|
-D llvm=enabled
|
||||||
-D gallium-va=true
|
-D gallium-va=enabled
|
||||||
-D video-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec
|
-D video-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec
|
||||||
EXTRA_OPTION: >
|
EXTRA_OPTION: >
|
||||||
-D min-windows-version=7
|
-D min-windows-version=7
|
||||||
|
@@ -49,7 +49,7 @@ meson `
|
|||||||
-Dshared-llvm=disabled `
|
-Dshared-llvm=disabled `
|
||||||
-Dvulkan-drivers="swrast,amd,microsoft-experimental" `
|
-Dvulkan-drivers="swrast,amd,microsoft-experimental" `
|
||||||
-Dgallium-drivers="swrast,d3d12,zink" `
|
-Dgallium-drivers="swrast,d3d12,zink" `
|
||||||
-Dgallium-va=true `
|
-Dgallium-va=enabled `
|
||||||
-Dvideo-codecs="h264dec,h264enc,h265dec,h265enc,vc1dec" `
|
-Dvideo-codecs="h264dec,h264enc,h265dec,h265enc,vc1dec" `
|
||||||
-Dshared-glapi=enabled `
|
-Dshared-glapi=enabled `
|
||||||
-Dgles1=enabled `
|
-Dgles1=enabled `
|
||||||
|
55
meson.build
55
meson.build
@@ -756,44 +756,27 @@ if with_gallium_omx != 'disabled'
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
_va = get_option('gallium-va')
|
_va_drivers = [
|
||||||
if _va == 'true'
|
with_gallium_d3d12_video,
|
||||||
_va = 'enabled'
|
with_gallium_nouveau,
|
||||||
warning('gallium-va option "true" deprecated, please use "enabled" instead.')
|
with_gallium_r600,
|
||||||
elif _va == 'false'
|
with_gallium_radeonsi,
|
||||||
_va = 'disabled'
|
with_gallium_virgl,
|
||||||
warning('gallium-va option "false" deprecated, please use "disabled" instead.')
|
]
|
||||||
endif
|
|
||||||
if not [
|
_va = get_option('gallium-va') \
|
||||||
with_gallium_d3d12_video,
|
.require(_va_drivers.contains(true),
|
||||||
with_gallium_nouveau,
|
error_message : 'VA state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video), virgl.')
|
||||||
with_gallium_r600,
|
_dep_va_name = host_machine.system() == 'windows' ? 'libva-win32' : 'libva'
|
||||||
with_gallium_radeonsi,
|
dep_va = dependency(_dep_va_name, version : '>= 1.8.0', required : _va)
|
||||||
with_gallium_virgl,
|
if dep_va.found()
|
||||||
].contains(true)
|
dep_va_headers = dep_va.partial_dependency(compile_args : true)
|
||||||
if _va == 'enabled'
|
if cc.has_header_symbol('va/va.h', 'VASurfaceAttribDRMFormatModifiers',
|
||||||
error('VA state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video), virgl.')
|
dependencies: dep_va_headers)
|
||||||
else
|
pre_args += '-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS'
|
||||||
_va = 'disabled'
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
with_gallium_va = false
|
|
||||||
dep_va = null_dep
|
|
||||||
if _va != 'disabled'
|
|
||||||
_dep_va_name = 'libva'
|
|
||||||
if host_machine.system() == 'windows'
|
|
||||||
_dep_va_name = 'libva-win32'
|
|
||||||
endif
|
|
||||||
dep_va = dependency(_dep_va_name, version : '>= 1.8.0', required : _va == 'enabled')
|
|
||||||
if dep_va.found()
|
|
||||||
dep_va_headers = dep_va.partial_dependency(compile_args : true)
|
|
||||||
with_gallium_va = true
|
|
||||||
if cc.has_header_symbol('va/va.h', 'VASurfaceAttribDRMFormatModifiers',
|
|
||||||
dependencies: dep_va_headers)
|
|
||||||
pre_args += '-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS'
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
with_gallium_va = dep_va.found()
|
||||||
|
|
||||||
va_drivers_path = get_option('va-libs-path')
|
va_drivers_path = get_option('va-libs-path')
|
||||||
if va_drivers_path == ''
|
if va_drivers_path == ''
|
||||||
|
@@ -109,9 +109,7 @@ option(
|
|||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'gallium-va',
|
'gallium-va',
|
||||||
type : 'combo',
|
type : 'feature',
|
||||||
value : 'auto',
|
|
||||||
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
|
||||||
description : 'enable gallium va frontend.',
|
description : 'enable gallium va frontend.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
|
Reference in New Issue
Block a user