mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-07 03:58:19 +02:00
meson: Add support for buidling zink + Turnip/KGSL
Rename the 'hurd' dri_platform to 'pseudo-drm' to represent non-DRM presentation platforms. This platform is now also enabled when building zink and Turnip with the KGSL backend, allowing zink to use Kopper. Acked-by: Emma Anholt <emma@anholt.net> Reviewed-by: Eric Engestrom <eric@igalia.com> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8634 Signed-off-by: Valentine Burley <valentine.burley@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40302>
This commit is contained in:
parent
14f60b440f
commit
6ebf2d6f32
6 changed files with 14 additions and 14 deletions
18
meson.build
18
meson.build
|
|
@ -352,7 +352,7 @@ with_vdrm = [
|
|||
].contains(true)
|
||||
|
||||
with_dri = false
|
||||
if with_gallium and system_has_kms_drm
|
||||
if with_gallium and (system_has_kms_drm or (freedreno_kmds.contains('kgsl') and with_gallium_zink))
|
||||
_glx = get_option('glx')
|
||||
_egl = get_option('egl')
|
||||
if _glx == 'dri' or _egl.enabled() or (_glx == 'disabled' and _egl.allowed())
|
||||
|
|
@ -413,8 +413,8 @@ elif ['windows', 'cygwin'].contains(host_machine.system())
|
|||
with_dri_platform = 'windows'
|
||||
elif system_has_kms_drm
|
||||
with_dri_platform = 'drm'
|
||||
elif host_machine.system() == 'gnu'
|
||||
with_dri_platform = 'hurd'
|
||||
elif host_machine.system() == 'gnu' or (freedreno_kmds.contains('kgsl') and with_gallium_zink)
|
||||
with_dri_platform = 'pseudo-drm'
|
||||
else
|
||||
# FIXME: haiku doesn't use dri, and xlib doesn't use dri, probably should
|
||||
# assert here that one of those cases has been met.
|
||||
|
|
@ -538,7 +538,7 @@ with_gbm = get_option('gbm') \
|
|||
.allowed()
|
||||
|
||||
with_xlib_lease = get_option('xlib-lease') \
|
||||
.require(with_platform_x11 and (system_has_kms_drm or with_dri_platform == 'apple' or with_dri_platform == 'hurd'), error_message : 'xlib-lease requires X11 and KMS/DRM support') \
|
||||
.require(with_platform_x11 and (system_has_kms_drm or with_dri_platform == 'apple' or with_dri_platform == 'pseudo-drm'), error_message : 'xlib-lease requires X11 and KMS/DRM support') \
|
||||
.allowed()
|
||||
|
||||
with_egl = get_option('egl') \
|
||||
|
|
@ -657,7 +657,7 @@ if with_vulkan_icd_dir == ''
|
|||
with_vulkan_icd_dir = join_paths(get_option('datadir'), 'vulkan/icd.d')
|
||||
endif
|
||||
|
||||
with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or with_dri_platform == 'apple' or with_dri_platform == 'hurd')
|
||||
with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or with_dri_platform == 'apple' or with_dri_platform == 'pseudo-drm')
|
||||
|
||||
if with_dri
|
||||
if with_glx == 'disabled' and not with_egl and not with_gbm
|
||||
|
|
@ -2226,7 +2226,7 @@ if with_platform_x11
|
|||
error('libdrm required for gallium video statetrackers when using x11')
|
||||
endif
|
||||
endif
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'hurd'
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'pseudo-drm'
|
||||
dep_xcb_dri3 = dependency('xcb-dri3', version : dep_xcb_dri3_version)
|
||||
dep_xcb_present = dependency('xcb-present', version : dep_xcb_present_version)
|
||||
if (dep_xcb_dri3.version().version_compare('>= 1.17') and
|
||||
|
|
@ -2242,7 +2242,7 @@ if with_platform_x11
|
|||
dep_glproto = dependency('glproto', version : dep_glproto_version)
|
||||
endif
|
||||
if with_glx == 'dri'
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'hurd'
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'pseudo-drm'
|
||||
if with_glx_direct
|
||||
dep_xxf86vm = dependency('xxf86vm')
|
||||
endif
|
||||
|
|
@ -2352,7 +2352,7 @@ elif with_glx == 'dri'
|
|||
gl_priv_reqs += [
|
||||
'x11', 'xext', 'xfixes', 'x11-xcb', 'xcb',
|
||||
'xcb-glx >= 1.8.1']
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'hurd'
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'pseudo-drm'
|
||||
gl_priv_reqs += 'xcb-dri2 >= 1.8'
|
||||
if with_glx_direct
|
||||
gl_priv_reqs += 'xxf86vm'
|
||||
|
|
@ -2486,7 +2486,7 @@ if with_egl
|
|||
if with_dri
|
||||
egl_drivers += 'builtin:egl_dri2'
|
||||
endif
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'hurd'
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'pseudo-drm'
|
||||
egl_drivers += 'builtin:egl_dri3'
|
||||
endif
|
||||
if with_platform_windows
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ if with_dri
|
|||
files_egl += files('drivers/dri2/platform_x11.c')
|
||||
incs_for_egl += inc_loader_x11
|
||||
link_for_egl += libloader_x11
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'hurd'
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'pseudo-drm'
|
||||
files_egl += files('drivers/dri2/platform_x11_dri3.c')
|
||||
endif
|
||||
deps_for_egl += [dep_x11_xcb, dep_xcb_xrandr, dep_xcb_xfixes, dep_xcb_shm]
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ endif
|
|||
if with_platform_x11
|
||||
files_libgalliumvlwinsys += files('vl/vl_winsys_dri.c')
|
||||
links_libgalliumvlwinsys += libloader_x11
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'hurd'
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'pseudo-drm'
|
||||
vlwinsys_deps += [
|
||||
dep_xcb_sync, dep_xcb_present, dep_xshmfence, dep_xcb_xfixes,
|
||||
dep_xcb_dri3,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ files_libdri = files(
|
|||
|
||||
if with_platform_x11
|
||||
deps_for_libdri += dep_xcb
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'hurd'
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'pseudo-drm'
|
||||
deps_for_libdri += [dep_xcb_dri3, dep_xcb_present, dep_xcb_sync,
|
||||
dep_xshmfence, dep_xcb_xfixes]
|
||||
files_libdri += files('loader_dri3_helper.c')
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ extra_libs_libglx = []
|
|||
extra_deps_libgl = []
|
||||
extra_ld_args_libgl = []
|
||||
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'hurd'
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'pseudo-drm'
|
||||
files_libglx += files('dri3_glx.c', 'dri3_priv.h')
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ loader_x11_files = files(
|
|||
'x11_display.c',
|
||||
)
|
||||
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'hurd'
|
||||
if with_dri_platform == 'drm' or with_dri_platform == 'pseudo-drm'
|
||||
loader_x11_files += files('x11_dri3.c')
|
||||
endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue