aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-06-25 13:47:04 +0100
committerMarge Bot <[email protected]>2020-07-10 13:48:23 +0000
commita38e21d6683aeecb51aea4f933a77c6e7f1a6179 (patch)
tree503a253030dbe300033cf2e3dedf94312825d997 /meson.build
parente66e0c0c2d017722f6ffba114a140fec683652e0 (diff)
egl: always compile surfaceless
It has no dependencies and costs virtually nothing to build. There is no downside to enabling it unconditionally, so let's do just that. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3161>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build30
1 files changed, 11 insertions, 19 deletions
diff --git a/meson.build b/meson.build
index 043047ddbea..1c4e93d5207 100644
--- a/meson.build
+++ b/meson.build
@@ -293,9 +293,9 @@ endif
_platforms = get_option('platforms')
if _platforms.contains('auto')
if system_has_kms_drm
- _platforms = ['x11', 'wayland', 'drm', 'surfaceless']
+ _platforms = ['x11', 'wayland', 'drm']
elif ['darwin', 'cygwin'].contains(host_machine.system())
- _platforms = ['x11', 'surfaceless']
+ _platforms = ['x11']
elif ['haiku'].contains(host_machine.system())
_platforms = ['haiku']
elif host_machine.system() == 'windows'
@@ -311,11 +311,16 @@ with_platform_x11 = _platforms.contains('x11')
with_platform_wayland = _platforms.contains('wayland')
with_platform_drm = _platforms.contains('drm')
with_platform_haiku = _platforms.contains('haiku')
-with_platform_surfaceless = _platforms.contains('surfaceless')
with_platform_windows = _platforms.contains('windows')
+if _platforms.contains('surfaceless')
+ warning('Platform `surfaceless` is now always selected; setting this option will be an error in Mesa 20.3')
+endif
+
if _platforms.length() != 0
egl_native_platform = _platforms[0]
+else
+ egl_native_platform = 'surfaceless'
endif
_xlib_lease = get_option('xlib-lease')
@@ -393,15 +398,13 @@ endif
if _egl == 'auto'
with_egl = (
not ['darwin', 'windows'].contains(host_machine.system()) and
- with_dri and with_shared_glapi and _platforms.length() != 0
+ with_dri and with_shared_glapi
)
elif _egl == 'enabled'
if not with_dri
error('EGL requires dri')
elif not with_shared_glapi
error('EGL requires shared-glapi')
- elif _platforms.length() == 0
- error('No platforms specified, consider -Dplatforms=drm,x11,surfaceless at least')
elif not ['disabled', 'dri'].contains(with_glx)
error('EGL requires dri, but a GLX is being built without dri')
elif ['darwin', 'windows'].contains(host_machine.system())
@@ -412,15 +415,6 @@ else
with_egl = false
endif
-if with_egl and not (with_platform_drm or with_platform_surfaceless or with_platform_android)
- if with_gallium_radeonsi
- error('RadeonSI requires the drm, surfaceless or android platform when using EGL')
- endif
- if with_gallium_virgl
- error('Virgl requires the drm, surfaceless or android platform when using EGL')
- endif
-endif
-
# Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
if not ['windows', 'freebsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
pre_args += '-DUSE_ELF_TLS'
@@ -834,9 +828,6 @@ if with_platform_drm
endif
pre_args += '-DHAVE_DRM_PLATFORM'
endif
-if with_platform_surfaceless
- pre_args += '-DHAVE_SURFACELESS_PLATFORM'
-endif
if with_platform_android
dep_android = [
dependency('cutils'),
@@ -1888,7 +1879,8 @@ if with_egl
lines += 'EGL drivers: ' + ' '.join(egl_drivers)
endif
lines += 'GBM: ' + (with_gbm ? 'yes' : 'no')
-if _platforms.length() != 0
+if with_egl or with_any_vk
+ _platforms += 'surfaceless'
lines += 'EGL/Vulkan/VL platforms: ' + ' '.join(_platforms)
endif