egl: Enable EGL_EXT_client_extensions
Insert two fields into _egl_global to hold the client extensions and statically initialize them: ClientExtensions // a struct of bools ClientExtensionString Post-patch, Mesa supports exactly one client extension, EGL_EXT_client_extensions. Signed-off-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
@@ -87,6 +87,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "eglglobals.h"
|
||||||
#include "eglcontext.h"
|
#include "eglcontext.h"
|
||||||
#include "egldisplay.h"
|
#include "egldisplay.h"
|
||||||
#include "egltypedefs.h"
|
#include "egltypedefs.h"
|
||||||
@@ -354,10 +355,15 @@ eglTerminate(EGLDisplay dpy)
|
|||||||
const char * EGLAPIENTRY
|
const char * EGLAPIENTRY
|
||||||
eglQueryString(EGLDisplay dpy, EGLint name)
|
eglQueryString(EGLDisplay dpy, EGLint name)
|
||||||
{
|
{
|
||||||
_EGLDisplay *disp = _eglLockDisplay(dpy);
|
_EGLDisplay *disp;
|
||||||
_EGLDriver *drv;
|
_EGLDriver *drv;
|
||||||
const char *ret;
|
const char *ret;
|
||||||
|
|
||||||
|
if (dpy == EGL_NO_DISPLAY && name == EGL_EXTENSIONS) {
|
||||||
|
RETURN_EGL_SUCCESS(NULL, _eglGlobal.ClientExtensionString);
|
||||||
|
}
|
||||||
|
|
||||||
|
disp = _eglLockDisplay(dpy);
|
||||||
_EGL_CHECK_DISPLAY(disp, NULL, drv);
|
_EGL_CHECK_DISPLAY(disp, NULL, drv);
|
||||||
ret = drv->API.QueryString(drv, disp, name);
|
ret = drv->API.QueryString(drv, disp, name);
|
||||||
|
|
||||||
|
@@ -47,6 +47,14 @@ struct _egl_global _eglGlobal =
|
|||||||
_eglUnloadDrivers, /* always called last */
|
_eglUnloadDrivers, /* always called last */
|
||||||
_eglFiniDisplay
|
_eglFiniDisplay
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* ClientExtensions */
|
||||||
|
{
|
||||||
|
true /* EGL_EXT_client_extensions */
|
||||||
|
},
|
||||||
|
|
||||||
|
/* ClientExtensionsString */
|
||||||
|
"EGL_EXT_client_extensions"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
#ifndef EGLGLOBALS_INCLUDED
|
#ifndef EGLGLOBALS_INCLUDED
|
||||||
#define EGLGLOBALS_INCLUDED
|
#define EGLGLOBALS_INCLUDED
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "egltypedefs.h"
|
#include "egltypedefs.h"
|
||||||
#include "eglmutex.h"
|
#include "eglmutex.h"
|
||||||
@@ -48,6 +49,12 @@ struct _egl_global
|
|||||||
|
|
||||||
EGLint NumAtExitCalls;
|
EGLint NumAtExitCalls;
|
||||||
void (*AtExitCalls[10])(void);
|
void (*AtExitCalls[10])(void);
|
||||||
|
|
||||||
|
struct _egl_client_extensions {
|
||||||
|
bool EXT_client_extensions;
|
||||||
|
} ClientExtensions;
|
||||||
|
|
||||||
|
const char *ClientExtensionString;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user