From 4a343a4b563e84c6258efbddf1d910f9dd6e0300 Mon Sep 17 00:00:00 2001 From: Erik Kurzinger Date: Wed, 25 Mar 2020 08:38:09 -0700 Subject: [PATCH] add EGL_WL_bind_wayland_display definitions to wayland-egl-ext.h The definitions for the EGL_WL_bind_wayland_display extension were previously provided by eglmesaext.h, included through eglext.h. However, recent versions of the eglext.h header shipped with mesa (which most distributions use) no longer include platform headers. This causes the build to fail due to undefined symbols. This change adds the required definitions to wayland-egl-ext.h ensuring they're always available. This also avoids having a dependency on the aforementioned mesa header. Signed-off-by: Erik Kurzinger --- wayland-egl/wayland-egl-ext.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/wayland-egl/wayland-egl-ext.h b/wayland-egl/wayland-egl-ext.h index 6688e45..a258bf4 100644 --- a/wayland-egl/wayland-egl-ext.h +++ b/wayland-egl/wayland-egl-ext.h @@ -23,6 +23,30 @@ #ifndef WAYLAND_EGL_EXT_H #define WAYLAND_EGL_EXT_H +#ifndef EGL_WL_bind_wayland_display +#define EGL_WL_bind_wayland_display 1 +#define PFNEGLBINDWAYLANDDISPLAYWL PFNEGLBINDWAYLANDDISPLAYWLPROC +#define PFNEGLUNBINDWAYLANDDISPLAYWL PFNEGLUNBINDWAYLANDDISPLAYWLPROC +#define PFNEGLQUERYWAYLANDBUFFERWL PFNEGLQUERYWAYLANDBUFFERWLPROC +struct wl_display; +struct wl_resource; +#define EGL_WAYLAND_BUFFER_WL 0x31D5 +#define EGL_WAYLAND_PLANE_WL 0x31D6 +#define EGL_TEXTURE_Y_U_V_WL 0x31D7 +#define EGL_TEXTURE_Y_UV_WL 0x31D8 +#define EGL_TEXTURE_Y_XUXV_WL 0x31D9 +#define EGL_TEXTURE_EXTERNAL_WL 0x31DA +#define EGL_WAYLAND_Y_INVERTED_WL 0x31DB +typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWLPROC) (EGLDisplay dpy, struct wl_display *display); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWLPROC) (EGLDisplay dpy, struct wl_display *display); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWLPROC) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL (EGLDisplay dpy, struct wl_display *display); +EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL (EGLDisplay dpy, struct wl_display *display); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); +#endif +#endif /* EGL_WL_bind_wayland_display */ + #ifndef EGL_WL_wayland_eglstream #define EGL_WL_wayland_eglstream 1 #define EGL_WAYLAND_EGLSTREAM_WL 0x334B