summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglapi.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-06-03 11:25:19 +0200
committerMarek Olšák <[email protected]>2016-06-03 11:33:45 +0200
commit8c361e84ad010552a42593fad4130befc58e9a6a (patch)
tree1a0b95b095bc6871342dfb0c3a68d1830815146c /src/egl/main/eglapi.c
parent9bdbb9c0e0d0fb73831c590eb9626a3298f55982 (diff)
Revert "egl: Check if API is supported when using eglBindAPI."
This reverts commit e8b38ca202fbe8c281aeb81a4b64256983f185e0. It broke Glamor for Gallium at least.
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r--src/egl/main/eglapi.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 4ef0a2759b5..4700dbe42f6 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -1196,61 +1196,6 @@ eglGetError(void)
}
-static bool
-_eglDisplaySupportsApi(_EGLDisplay *dpy, EGLenum api)
-{
- if (!dpy->Initialized) {
- return false;
- }
-
- switch (api) {
- case EGL_OPENGL_API:
- return !!(dpy->ClientAPIs & EGL_OPENGL_BIT);
- case EGL_OPENGL_ES_API:
- return dpy->ClientAPIs & EGL_OPENGL_ES_BIT ||
- dpy->ClientAPIs & EGL_OPENGL_ES2_BIT ||
- dpy->ClientAPIs & EGL_OPENGL_ES3_BIT_KHR;
- case EGL_OPENVG_API:
- return !!(dpy->ClientAPIs & EGL_OPENVG_BIT);
- }
-
- return false;
-}
-
-
-/**
- * Return true if a client API enum is recognized.
- */
-static bool
-_eglIsApiValid(EGLenum api)
-{
- _EGLDisplay *dpy = _eglGlobal.DisplayList;
- _EGLThreadInfo *current_thread = _eglGetCurrentThread();
-
- if (api != EGL_OPENGL_API && api != EGL_OPENGL_ES_API &&
- api != EGL_OPENVG_API) {
- return false;
- }
-
- while (dpy) {
- _EGLThreadInfo *thread = dpy->ThreadList;
-
- while (thread) {
- if (thread == current_thread) {
- if (_eglDisplaySupportsApi(dpy, api))
- return true;
- }
-
- thread = thread->Next;
- }
-
- dpy = dpy->Next;
- }
-
- return false;
-}
-
-
/**
** EGL 1.2
**/
@@ -1266,16 +1211,6 @@ _eglIsApiValid(EGLenum api)
* eglWaitNative()
* See section 3.7 "Rendering Context" in the EGL specification for details.
*/
-
- /**
- * Section 3.7 (Rendering Contexts) of the EGL 1.5 spec says:
- *
- * "api must specify one of the supported client APIs, either
- * EGL_OPENGL_API, EGL_OPENGL_ES_API, or EGL_OPENVG_API... If api
- * is not one of the values specified above, or if the client API
- * specified by api is not supported by the implementation, an
- * EGL_BAD_PARAMETER error is generated."
- */
EGLBoolean EGLAPIENTRY
eglBindAPI(EGLenum api)
{