mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 04:50:11 +01:00
egl: rewire the build systems to use libwayland-egl
Cc: Emil Velikov <emil.l.velikov@gmail.com> Cc: Daniel Stone <daniels@collabora.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
67f7a16b59
commit
1db4ec0546
7 changed files with 15 additions and 21 deletions
|
|
@ -90,6 +90,7 @@ LIBOMXIL_TIZONIA_REQUIRED=0.10.0
|
||||||
LIBVA_REQUIRED=0.39.0
|
LIBVA_REQUIRED=0.39.0
|
||||||
VDPAU_REQUIRED=1.1
|
VDPAU_REQUIRED=1.1
|
||||||
WAYLAND_REQUIRED=1.11
|
WAYLAND_REQUIRED=1.11
|
||||||
|
WAYLAND_EGL_REQUIRED=1.15
|
||||||
WAYLAND_PROTOCOLS_REQUIRED=1.8
|
WAYLAND_PROTOCOLS_REQUIRED=1.8
|
||||||
XCB_REQUIRED=1.9.3
|
XCB_REQUIRED=1.9.3
|
||||||
XCBDRI2_REQUIRED=1.8
|
XCBDRI2_REQUIRED=1.8
|
||||||
|
|
@ -1808,6 +1809,9 @@ for plat in $platforms; do
|
||||||
PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= $WAYLAND_REQUIRED])
|
PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= $WAYLAND_REQUIRED])
|
||||||
PKG_CHECK_MODULES([WAYLAND_SERVER], [wayland-server >= $WAYLAND_REQUIRED])
|
PKG_CHECK_MODULES([WAYLAND_SERVER], [wayland-server >= $WAYLAND_REQUIRED])
|
||||||
PKG_CHECK_MODULES([WAYLAND_PROTOCOLS], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED])
|
PKG_CHECK_MODULES([WAYLAND_PROTOCOLS], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED])
|
||||||
|
if test "x$enable_egl" = xyes; then
|
||||||
|
PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl >= $WAYLAND_EGL_REQUIRED])
|
||||||
|
fi
|
||||||
WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
|
WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
|
||||||
|
|
||||||
PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
|
PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
|
||||||
|
|
@ -3022,8 +3026,6 @@ AC_CONFIG_FILES([Makefile
|
||||||
src/egl/Makefile
|
src/egl/Makefile
|
||||||
src/egl/main/egl.pc
|
src/egl/main/egl.pc
|
||||||
src/egl/wayland/wayland-drm/Makefile
|
src/egl/wayland/wayland-drm/Makefile
|
||||||
src/egl/wayland/wayland-egl/Makefile
|
|
||||||
src/egl/wayland/wayland-egl/wayland-egl.pc
|
|
||||||
src/gallium/Makefile
|
src/gallium/Makefile
|
||||||
src/gallium/auxiliary/Makefile
|
src/gallium/auxiliary/Makefile
|
||||||
src/gallium/auxiliary/pipe-loader/Makefile
|
src/gallium/auxiliary/pipe-loader/Makefile
|
||||||
|
|
|
||||||
|
|
@ -1201,6 +1201,9 @@ if with_platform_wayland
|
||||||
dep_wl_protocols = dependency('wayland-protocols', version : '>= 1.8')
|
dep_wl_protocols = dependency('wayland-protocols', version : '>= 1.8')
|
||||||
dep_wayland_client = dependency('wayland-client', version : '>=1.11')
|
dep_wayland_client = dependency('wayland-client', version : '>=1.11')
|
||||||
dep_wayland_server = dependency('wayland-server', version : '>=1.11')
|
dep_wayland_server = dependency('wayland-server', version : '>=1.11')
|
||||||
|
if with_egl
|
||||||
|
dep_wayland_egl = dependency('wayland-egl', version : '>=1.15')
|
||||||
|
endif
|
||||||
wayland_dmabuf_xml = join_paths(
|
wayland_dmabuf_xml = join_paths(
|
||||||
dep_wl_protocols.get_pkgconfig_variable('pkgdatadir'), 'unstable',
|
dep_wl_protocols.get_pkgconfig_variable('pkgdatadir'), 'unstable',
|
||||||
'linux-dmabuf', 'linux-dmabuf-unstable-v1.xml'
|
'linux-dmabuf', 'linux-dmabuf-unstable-v1.xml'
|
||||||
|
|
|
||||||
|
|
@ -95,11 +95,6 @@ if HAVE_GBM
|
||||||
SUBDIRS += gbm
|
SUBDIRS += gbm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
## Optionally required by EGL
|
|
||||||
if HAVE_PLATFORM_WAYLAND
|
|
||||||
SUBDIRS += egl/wayland/wayland-egl
|
|
||||||
endif
|
|
||||||
|
|
||||||
if HAVE_EGL
|
if HAVE_EGL
|
||||||
SUBDIRS += egl
|
SUBDIRS += egl
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,8 @@ drivers/dri2/egl_dri2.lo: drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.
|
||||||
AM_CFLAGS += $(WAYLAND_CLIENT_CFLAGS)
|
AM_CFLAGS += $(WAYLAND_CLIENT_CFLAGS)
|
||||||
libEGL_common_la_LIBADD += $(WAYLAND_CLIENT_LIBS)
|
libEGL_common_la_LIBADD += $(WAYLAND_CLIENT_LIBS)
|
||||||
libEGL_common_la_LIBADD += $(LIBDRM_LIBS)
|
libEGL_common_la_LIBADD += $(LIBDRM_LIBS)
|
||||||
|
AM_CFLAGS += $(WAYLAND_EGL_CFLAGS)
|
||||||
|
libEGL_common_la_LIBADD += $(WAYLAND_EGL_LIBS)
|
||||||
AM_CFLAGS += $(WAYLAND_SERVER_CFLAGS)
|
AM_CFLAGS += $(WAYLAND_SERVER_CFLAGS)
|
||||||
libEGL_common_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
|
libEGL_common_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
|
||||||
libEGL_common_la_LIBADD += $(WAYLAND_SERVER_LIBS)
|
libEGL_common_la_LIBADD += $(WAYLAND_SERVER_LIBS)
|
||||||
|
|
@ -114,7 +116,6 @@ AM_CFLAGS += \
|
||||||
-I$(top_builddir)/src/egl/drivers/dri2 \
|
-I$(top_builddir)/src/egl/drivers/dri2 \
|
||||||
-I$(top_srcdir)/src/egl/drivers/dri2 \
|
-I$(top_srcdir)/src/egl/drivers/dri2 \
|
||||||
-I$(top_srcdir)/src/gbm/backends/dri \
|
-I$(top_srcdir)/src/gbm/backends/dri \
|
||||||
-I$(top_srcdir)/src/egl/wayland/wayland-egl \
|
|
||||||
-I$(top_builddir)/src/egl/wayland/wayland-drm \
|
-I$(top_builddir)/src/egl/wayland/wayland-drm \
|
||||||
-I$(top_srcdir)/src/egl/wayland/wayland-drm \
|
-I$(top_srcdir)/src/egl/wayland/wayland-drm \
|
||||||
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
|
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,11 @@
|
||||||
#include "util/u_vector.h"
|
#include "util/u_vector.h"
|
||||||
#include "eglglobals.h"
|
#include "eglglobals.h"
|
||||||
|
|
||||||
|
#include <wayland-egl-backend.h>
|
||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
#include "wayland-drm-client-protocol.h"
|
#include "wayland-drm-client-protocol.h"
|
||||||
#include "linux-dmabuf-unstable-v1-client-protocol.h"
|
#include "linux-dmabuf-unstable-v1-client-protocol.h"
|
||||||
|
|
||||||
#include "wayland/wayland-egl/wayland-egl-backend.h"
|
|
||||||
|
|
||||||
#ifndef DRM_FORMAT_MOD_INVALID
|
#ifndef DRM_FORMAT_MOD_INVALID
|
||||||
#define DRM_FORMAT_MOD_INVALID ((1ULL << 56) - 1)
|
#define DRM_FORMAT_MOD_INVALID ((1ULL << 56) - 1)
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -298,7 +297,7 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||||
dri2_surf->wl_queue);
|
dri2_surf->wl_queue);
|
||||||
|
|
||||||
dri2_surf->wl_win = window;
|
dri2_surf->wl_win = window;
|
||||||
dri2_surf->wl_win->private = dri2_surf;
|
dri2_surf->wl_win->driver_private = dri2_surf;
|
||||||
dri2_surf->wl_win->destroy_window_callback = destroy_window_callback;
|
dri2_surf->wl_win->destroy_window_callback = destroy_window_callback;
|
||||||
if (dri2_dpy->flush)
|
if (dri2_dpy->flush)
|
||||||
dri2_surf->wl_win->resize_callback = resize_callback;
|
dri2_surf->wl_win->resize_callback = resize_callback;
|
||||||
|
|
@ -384,7 +383,7 @@ dri2_wl_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
|
||||||
wl_callback_destroy(dri2_surf->throttle_callback);
|
wl_callback_destroy(dri2_surf->throttle_callback);
|
||||||
|
|
||||||
if (dri2_surf->wl_win) {
|
if (dri2_surf->wl_win) {
|
||||||
dri2_surf->wl_win->private = NULL;
|
dri2_surf->wl_win->driver_private = NULL;
|
||||||
dri2_surf->wl_win->resize_callback = NULL;
|
dri2_surf->wl_win->resize_callback = NULL;
|
||||||
dri2_surf->wl_win->destroy_window_callback = NULL;
|
dri2_surf->wl_win->destroy_window_callback = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ if with_platform_surfaceless
|
||||||
files_egl += files('drivers/dri2/platform_surfaceless.c')
|
files_egl += files('drivers/dri2/platform_surfaceless.c')
|
||||||
endif
|
endif
|
||||||
if with_platform_wayland
|
if with_platform_wayland
|
||||||
deps_for_egl += [dep_wayland_client, dep_wayland_server]
|
deps_for_egl += [dep_wayland_client, dep_wayland_server, dep_wayland_egl]
|
||||||
link_for_egl += libwayland_drm
|
link_for_egl += libwayland_drm
|
||||||
files_egl += files('drivers/dri2/platform_wayland.c')
|
files_egl += files('drivers/dri2/platform_wayland.c')
|
||||||
files_egl += [
|
files_egl += [
|
||||||
|
|
@ -124,9 +124,7 @@ if with_platform_wayland
|
||||||
linux_dmabuf_unstable_v1_client_protocol_h,
|
linux_dmabuf_unstable_v1_client_protocol_h,
|
||||||
wayland_drm_client_protocol_h,
|
wayland_drm_client_protocol_h,
|
||||||
]
|
]
|
||||||
incs_for_egl += include_directories(
|
incs_for_egl += include_directories('wayland/wayland-drm')
|
||||||
'wayland/wayland-egl', 'wayland/wayland-drm',
|
|
||||||
)
|
|
||||||
endif
|
endif
|
||||||
if with_platform_android
|
if with_platform_android
|
||||||
deps_for_egl += dep_android
|
deps_for_egl += dep_android
|
||||||
|
|
@ -198,10 +196,6 @@ pkg.generate(
|
||||||
extra_cflags : gl_pkgconfig_c_flags,
|
extra_cflags : gl_pkgconfig_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
if with_platform_wayland
|
|
||||||
subdir('wayland/wayland-egl')
|
|
||||||
endif
|
|
||||||
|
|
||||||
if with_tests
|
if with_tests
|
||||||
if with_glvnd
|
if with_glvnd
|
||||||
# TODO: add glvnd symbol check
|
# TODO: add glvnd symbol check
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ AM_CFLAGS = \
|
||||||
-I$(top_srcdir)/src/mesa/drivers/dri/common \
|
-I$(top_srcdir)/src/mesa/drivers/dri/common \
|
||||||
-I$(top_srcdir)/src/egl \
|
-I$(top_srcdir)/src/egl \
|
||||||
-I$(top_srcdir)/src/egl/drivers/dri2 \
|
-I$(top_srcdir)/src/egl/drivers/dri2 \
|
||||||
-I$(top_srcdir)/src/egl/wayland/wayland-egl \
|
|
||||||
-I$(top_srcdir)/src/egl/main \
|
-I$(top_srcdir)/src/egl/main \
|
||||||
-I$(top_srcdir)/src/gbm/main \
|
-I$(top_srcdir)/src/gbm/main \
|
||||||
-I$(top_srcdir)/src/loader \
|
-I$(top_srcdir)/src/loader \
|
||||||
|
|
@ -38,6 +37,7 @@ AM_CFLAGS = \
|
||||||
-I$(top_srcdir)/src/gallium/state_trackers/omx \
|
-I$(top_srcdir)/src/gallium/state_trackers/omx \
|
||||||
$(GALLIUM_CFLAGS) \
|
$(GALLIUM_CFLAGS) \
|
||||||
$(LIBDRM_CFLAGS) \
|
$(LIBDRM_CFLAGS) \
|
||||||
|
$(WAYLAND_EGL_CFLAGS) \
|
||||||
$(VISIBILITY_CFLAGS) \
|
$(VISIBILITY_CFLAGS) \
|
||||||
$(VL_CFLAGS) \
|
$(VL_CFLAGS) \
|
||||||
$(XCB_DRI3_CFLAGS) \
|
$(XCB_DRI3_CFLAGS) \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue