egl: move fallback calls to eglapi.c
[mesa.git] / src / egl / main / eglglobals.h
index dfa357759b8aedd868b2a8bc725f784a926718f5..63bea4ebc38245fe3540a71cdb8b23ce6c895162 100644 (file)
@@ -54,10 +54,20 @@ struct _egl_global
    /* the list of all displays */
    _EGLDisplay *DisplayList;
 
+   _EGLDevice *DeviceList;
+
    EGLint NumAtExitCalls;
    void (*AtExitCalls[10])(void);
 
-   const char *ClientExtensionString;
+   /*
+    * Under libglvnd, the client extension string has to be split into two
+    * strings, one for platform extensions, and one for everything else. So,
+    * define separate strings for them. _eglGetClientExtensionString will
+    * concatenate them together for a non-libglvnd build.
+    */
+   const char *ClientOnlyExtensionString;
+   const char *PlatformExtensionString;
+   char *ClientExtensionString;
 
    EGLDEBUGPROCKHR debugCallback;
    unsigned int debugTypesEnabled;
@@ -70,5 +80,19 @@ extern struct _egl_global _eglGlobal;
 extern void
 _eglAddAtExitCall(void (*func)(void));
 
+static inline unsigned int DebugBitFromType(EGLenum type)
+{
+   assert(type >= EGL_DEBUG_MSG_CRITICAL_KHR && type <= EGL_DEBUG_MSG_INFO_KHR);
+   return (1 << (type - EGL_DEBUG_MSG_CRITICAL_KHR));
+}
+
+extern const char *
+_eglGetClientExtensionString(void);
+
+/**
+ * Perform validity checks on a generic pointer.
+ */
+extern EGLBoolean
+_eglPointerIsDereferencable(void *p);
 
 #endif /* EGLGLOBALS_INCLUDED */