egl: replace MESA_EGL_NO_X11_HEADERS hack with upstream EGL_NO_X11
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:

committed by
Eric Engestrom

parent
90a35752b4
commit
6202a13b71
@@ -55,6 +55,12 @@
|
|||||||
#endif
|
#endif
|
||||||
#define EGLAPIENTRYP EGLAPIENTRY*
|
#define EGLAPIENTRYP EGLAPIENTRY*
|
||||||
|
|
||||||
|
#if defined(MESA_EGL_NO_X11_HEADERS) && !defined(EGL_NO_X11)
|
||||||
|
#warning "`MESA_EGL_NO_X11_HEADERS` is deprecated, and doesn't work with the unmodified Khronos header"
|
||||||
|
#warning "Please use `EGL_NO_X11` instead, as `MESA_EGL_NO_X11_HEADERS` will be removed soon"
|
||||||
|
#define EGL_NO_X11
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
|
/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
|
||||||
* are aliases of window-system-dependent types, such as X Display * or
|
* are aliases of window-system-dependent types, such as X Display * or
|
||||||
* Windows Device Context. They must be defined in platform-specific
|
* Windows Device Context. They must be defined in platform-specific
|
||||||
@@ -116,15 +122,13 @@ typedef intptr_t EGLNativeDisplayType;
|
|||||||
typedef intptr_t EGLNativePixmapType;
|
typedef intptr_t EGLNativePixmapType;
|
||||||
typedef intptr_t EGLNativeWindowType;
|
typedef intptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
#elif defined(__unix__) || defined(__APPLE__)
|
#elif defined(__unix__) && defined(EGL_NO_X11)
|
||||||
|
|
||||||
#if defined(MESA_EGL_NO_X11_HEADERS)
|
typedef void *EGLNativeDisplayType;
|
||||||
|
|
||||||
typedef void *EGLNativeDisplayType;
|
|
||||||
typedef khronos_uintptr_t EGLNativePixmapType;
|
typedef khronos_uintptr_t EGLNativePixmapType;
|
||||||
typedef khronos_uintptr_t EGLNativeWindowType;
|
typedef khronos_uintptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
#else
|
#elif defined(__unix__) || defined(USE_X11)
|
||||||
|
|
||||||
/* X11 (tentative) */
|
/* X11 (tentative) */
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
@@ -134,7 +138,11 @@ typedef Display *EGLNativeDisplayType;
|
|||||||
typedef Pixmap EGLNativePixmapType;
|
typedef Pixmap EGLNativePixmapType;
|
||||||
typedef Window EGLNativeWindowType;
|
typedef Window EGLNativeWindowType;
|
||||||
|
|
||||||
#endif /* MESA_EGL_NO_X11_HEADERS */
|
#elif defined(__APPLE__)
|
||||||
|
|
||||||
|
typedef int EGLNativeDisplayType;
|
||||||
|
typedef void *EGLNativePixmapType;
|
||||||
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
#elif defined(__HAIKU__)
|
#elif defined(__HAIKU__)
|
||||||
|
|
||||||
|
@@ -761,8 +761,8 @@ if with_platform_x11
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
pre_args += '-DMESA_EGL_NO_X11_HEADERS'
|
pre_args += '-DEGL_NO_X11'
|
||||||
gl_pkgconfig_c_flags += '-DMESA_EGL_NO_X11_HEADERS'
|
gl_pkgconfig_c_flags += '-DEGL_NO_X11'
|
||||||
endif
|
endif
|
||||||
if with_platform_drm
|
if with_platform_drm
|
||||||
if with_egl and not with_gbm
|
if with_egl and not with_gbm
|
||||||
|
Reference in New Issue
Block a user