egl: automatically compile the drm
platform when available
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3161>
This commit is contained in:

committed by
Marge Bot

parent
60ad006b27
commit
e00adef34a
@@ -520,7 +520,7 @@ meson-testing:
|
|||||||
-D glx=dri
|
-D glx=dri
|
||||||
-D gbm=enabled
|
-D gbm=enabled
|
||||||
-D egl=enabled
|
-D egl=enabled
|
||||||
-D platforms=x11,drm
|
-D platforms=x11
|
||||||
GALLIUM_ST: >
|
GALLIUM_ST: >
|
||||||
-D dri3=enabled
|
-D dri3=enabled
|
||||||
GALLIUM_DRIVERS: "swrast,virgl"
|
GALLIUM_DRIVERS: "swrast,virgl"
|
||||||
@@ -540,7 +540,7 @@ meson-gallium:
|
|||||||
-D glx=dri
|
-D glx=dri
|
||||||
-D gbm=enabled
|
-D gbm=enabled
|
||||||
-D egl=enabled
|
-D egl=enabled
|
||||||
-D platforms=x11,wayland,drm
|
-D platforms=x11,wayland
|
||||||
GALLIUM_ST: >
|
GALLIUM_ST: >
|
||||||
-D dri3=enabled
|
-D dri3=enabled
|
||||||
-D gallium-extra-hud=true
|
-D gallium-extra-hud=true
|
||||||
@@ -705,7 +705,7 @@ meson-clover-old-llvm:
|
|||||||
-D glx=disabled
|
-D glx=disabled
|
||||||
-D egl=disabled
|
-D egl=disabled
|
||||||
-D gbm=disabled
|
-D gbm=disabled
|
||||||
-D platforms=drm
|
-D platforms=[]
|
||||||
GALLIUM_DRIVERS: "i915,r600"
|
GALLIUM_DRIVERS: "i915,r600"
|
||||||
script:
|
script:
|
||||||
- LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
|
- LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
|
||||||
@@ -722,7 +722,7 @@ meson-vulkan:
|
|||||||
-D glx=disabled
|
-D glx=disabled
|
||||||
-D gbm=disabled
|
-D gbm=disabled
|
||||||
-D egl=disabled
|
-D egl=disabled
|
||||||
-D platforms=x11,wayland,drm
|
-D platforms=x11,wayland
|
||||||
-D osmesa=none
|
-D osmesa=none
|
||||||
GALLIUM_ST: >
|
GALLIUM_ST: >
|
||||||
-D dri3=enabled
|
-D dri3=enabled
|
||||||
|
@@ -49,11 +49,11 @@ time
|
|||||||
|
|
||||||
``-D platforms=...``
|
``-D platforms=...``
|
||||||
List the platforms (window systems) to support. Its argument is a
|
List the platforms (window systems) to support. Its argument is a
|
||||||
comma separated string such as ``-D platforms=x11,drm``. It decides
|
comma separated string such as ``-D platforms=x11,wayland``. It decides
|
||||||
the platforms a driver may support. The first listed platform is also
|
the platforms a driver may support. The first listed platform is also
|
||||||
used by the main library to decide the native platform.
|
used by the main library to decide the native platform.
|
||||||
|
|
||||||
The available platforms are ``x11``, ``drm``, ``wayland``,
|
The available platforms are ``x11``, ``wayland``,
|
||||||
``android``, and ``haiku``. The ``android`` platform
|
``android``, and ``haiku``. The ``android`` platform
|
||||||
can either be built as a system component, part of AOSP, using
|
can either be built as a system component, part of AOSP, using
|
||||||
``Android.mk`` files, or cross-compiled using appropriate options.
|
``Android.mk`` files, or cross-compiled using appropriate options.
|
||||||
|
17
meson.build
17
meson.build
@@ -293,7 +293,7 @@ endif
|
|||||||
_platforms = get_option('platforms')
|
_platforms = get_option('platforms')
|
||||||
if _platforms.contains('auto')
|
if _platforms.contains('auto')
|
||||||
if system_has_kms_drm
|
if system_has_kms_drm
|
||||||
_platforms = ['x11', 'wayland', 'drm']
|
_platforms = ['x11', 'wayland']
|
||||||
elif ['darwin', 'cygwin'].contains(host_machine.system())
|
elif ['darwin', 'cygwin'].contains(host_machine.system())
|
||||||
_platforms = ['x11']
|
_platforms = ['x11']
|
||||||
elif ['haiku'].contains(host_machine.system())
|
elif ['haiku'].contains(host_machine.system())
|
||||||
@@ -309,7 +309,6 @@ endif
|
|||||||
with_platform_android = _platforms.contains('android')
|
with_platform_android = _platforms.contains('android')
|
||||||
with_platform_x11 = _platforms.contains('x11')
|
with_platform_x11 = _platforms.contains('x11')
|
||||||
with_platform_wayland = _platforms.contains('wayland')
|
with_platform_wayland = _platforms.contains('wayland')
|
||||||
with_platform_drm = _platforms.contains('drm')
|
|
||||||
with_platform_haiku = _platforms.contains('haiku')
|
with_platform_haiku = _platforms.contains('haiku')
|
||||||
with_platform_windows = _platforms.contains('windows')
|
with_platform_windows = _platforms.contains('windows')
|
||||||
|
|
||||||
@@ -317,6 +316,10 @@ if _platforms.contains('surfaceless')
|
|||||||
warning('Platform `surfaceless` is now always selected; setting this option will be an error in Mesa 20.3')
|
warning('Platform `surfaceless` is now always selected; setting this option will be an error in Mesa 20.3')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if _platforms.contains('drm')
|
||||||
|
warning('Platform `drm` is now automatically selected; setting this option will be an error in Mesa 20.3')
|
||||||
|
endif
|
||||||
|
|
||||||
if _platforms.length() != 0
|
if _platforms.length() != 0
|
||||||
egl_native_platform = _platforms[0]
|
egl_native_platform = _platforms[0]
|
||||||
else
|
else
|
||||||
@@ -382,7 +385,7 @@ elif _xlib_lease == 'false'
|
|||||||
warning('xlib_lease option "false" deprecated, please use "disabled" instead.')
|
warning('xlib_lease option "false" deprecated, please use "disabled" instead.')
|
||||||
endif
|
endif
|
||||||
if _xlib_lease == 'auto'
|
if _xlib_lease == 'auto'
|
||||||
with_xlib_lease = with_platform_x11 and with_platform_drm
|
with_xlib_lease = with_platform_x11 and with_gbm
|
||||||
else
|
else
|
||||||
with_xlib_lease = _xlib_lease == 'enabled'
|
with_xlib_lease = _xlib_lease == 'enabled'
|
||||||
endif
|
endif
|
||||||
@@ -822,10 +825,7 @@ else
|
|||||||
pre_args += '-DEGL_NO_X11'
|
pre_args += '-DEGL_NO_X11'
|
||||||
gl_pkgconfig_c_flags += '-DEGL_NO_X11'
|
gl_pkgconfig_c_flags += '-DEGL_NO_X11'
|
||||||
endif
|
endif
|
||||||
if with_platform_drm
|
if with_gbm
|
||||||
if with_egl and not with_gbm
|
|
||||||
error('EGL drm platform requires gbm')
|
|
||||||
endif
|
|
||||||
pre_args += '-DHAVE_DRM_PLATFORM'
|
pre_args += '-DHAVE_DRM_PLATFORM'
|
||||||
endif
|
endif
|
||||||
if with_platform_android
|
if with_platform_android
|
||||||
@@ -1881,6 +1881,9 @@ endif
|
|||||||
lines += 'GBM: ' + (with_gbm ? 'yes' : 'no')
|
lines += 'GBM: ' + (with_gbm ? 'yes' : 'no')
|
||||||
if with_egl or with_any_vk
|
if with_egl or with_any_vk
|
||||||
_platforms += 'surfaceless'
|
_platforms += 'surfaceless'
|
||||||
|
if with_gbm
|
||||||
|
_platforms += 'drm'
|
||||||
|
endif
|
||||||
lines += 'EGL/Vulkan/VL platforms: ' + ' '.join(_platforms)
|
lines += 'EGL/Vulkan/VL platforms: ' + ' '.join(_platforms)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@@ -108,7 +108,7 @@ if with_dri2
|
|||||||
endif
|
endif
|
||||||
deps_for_egl += [dep_x11_xcb, dep_xcb_dri2, dep_xcb_xfixes]
|
deps_for_egl += [dep_x11_xcb, dep_xcb_dri2, dep_xcb_xfixes]
|
||||||
endif
|
endif
|
||||||
if with_platform_drm
|
if with_gbm
|
||||||
files_egl += files('drivers/dri2/platform_drm.c')
|
files_egl += files('drivers/dri2/platform_drm.c')
|
||||||
link_for_egl += libgbm
|
link_for_egl += libgbm
|
||||||
incs_for_egl += [inc_gbm, include_directories('../gbm/main')]
|
incs_for_egl += [inc_gbm, include_directories('../gbm/main')]
|
||||||
|
Reference in New Issue
Block a user