meson: Add OHOS platform

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
This commit is contained in:
Christian Gmeiner 2025-01-20 15:41:30 +01:00
parent d5290fc269
commit da399c9134
2 changed files with 12 additions and 3 deletions

View file

@ -334,7 +334,8 @@ if freedreno_kmds.length() != 0 and freedreno_kmds != [ 'msm' ] and with_freedre
endif
# This has to be below the freedreno_kmds check since that can change system_has_kms_drm
with_gallium_kmsro = with_gallium_drm or (system_has_kms_drm and with_gallium_zink)
# OHOS reports as 'linux' but has no libdrm, so exclude it from the zink+kmsro fallback.
with_gallium_kmsro = with_gallium_drm or (system_has_kms_drm and with_gallium_zink and not get_option('platforms').contains('ohos'))
pre_args += ['-DMESA_SYSTEM_HAS_KMS_DRM=@0@'.format(system_has_kms_drm.to_int())]
if host_machine.cpu_family() == 'x86' and with_glx_read_only_text
@ -482,6 +483,12 @@ with_platform_wayland = _platforms.contains('wayland')
with_platform_haiku = _platforms.contains('haiku')
with_platform_windows = _platforms.contains('windows')
with_platform_macos = _platforms.contains('macos')
with_platform_ohos = _platforms.contains('ohos')
if with_platform_ohos
pre_args += '-DVK_USE_PLATFORM_OHOS=1'
system_has_kms_drm = false
endif
with_gfxstream_emulated_android = with_gfxstream_vk and with_platform_android and host_machine.system() == 'linux'
if with_gfxstream_emulated_android
@ -510,6 +517,8 @@ if with_glx == 'auto'
with_glx = 'disabled'
elif with_platform_android
with_glx = 'disabled'
elif with_platform_ohos
with_glx = 'disabled'
elif with_dri
with_glx = 'dri'
elif with_platform_haiku

View file

@ -12,7 +12,7 @@ option(
type : 'array',
value : ['auto'],
choices : [
'auto', 'x11', 'wayland', 'haiku', 'android', 'windows', 'macos',
'auto', 'x11', 'wayland', 'haiku', 'android', 'windows', 'macos', 'ohos',
],
description : 'window systems to support. If this is set to `auto`, all ' +
'platforms applicable will be enabled.'
@ -23,7 +23,7 @@ option(
type : 'combo',
value : 'auto',
choices : [
'auto', 'x11', 'wayland', 'haiku', 'android', 'windows',
'auto', 'x11', 'wayland', 'haiku', 'android', 'windows', 'ohos',
'surfaceless', 'drm',
],
description : 'the window system EGL assumes for EGL_DEFAULT_DISPLAY',