summaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-07-18 09:38:34 -0700
committerIan Romanick <[email protected]>2012-08-06 15:37:04 -0700
commitb50703aea55450e04bcd8154335774786e0f253b (patch)
tree15f7e93313c66946f8199e530ee2d4e7ebe89010 /src/egl/main
parentcb77f5dd1f6658fca671454c9b5be9a23c3bf3e4 (diff)
egl: Replace KHR_surfaceless_* extensions with KHR_surfaceless_context
KHR extension name is reserved for Khronos ratified extensions, and there is no such thing as EGL_KHR_surfaceless_{gles1,gles2,opengl}. Replace these three extensions with EGL_KHR_surfaceless_context since that extension actually exists. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/eglapi.c8
-rw-r--r--src/egl/main/eglcontext.c19
-rw-r--r--src/egl/main/egldisplay.h4
-rw-r--r--src/egl/main/eglmisc.c4
4 files changed, 6 insertions, 29 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index ffc404cc2d7..bcc546557b8 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -427,9 +427,7 @@ eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_list,
if (!config) {
/* config may be NULL if surfaceless */
- if (!disp->Extensions.KHR_surfaceless_gles1 &&
- !disp->Extensions.KHR_surfaceless_gles2 &&
- !disp->Extensions.KHR_surfaceless_opengl)
+ if (!disp->Extensions.KHR_surfaceless_context)
RETURN_EGL_ERROR(disp, EGL_BAD_CONFIG, EGL_NO_CONTEXT);
}
@@ -487,9 +485,7 @@ eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read,
RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_FALSE);
if (!draw_surf || !read_surf) {
/* surfaces may be NULL if surfaceless */
- if (!disp->Extensions.KHR_surfaceless_gles1 &&
- !disp->Extensions.KHR_surfaceless_gles2 &&
- !disp->Extensions.KHR_surfaceless_opengl)
+ if (!disp->Extensions.KHR_surfaceless_context)
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
if ((!draw_surf && draw != EGL_NO_SURFACE) ||
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index 17cb03786be..fa6074971da 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -244,7 +244,6 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
_EGLThreadInfo *t = _eglGetCurrentThread();
_EGLDisplay *dpy;
EGLint conflict_api;
- EGLBoolean surfaceless;
if (_eglIsCurrentThreadDummy())
return _eglError(EGL_BAD_ALLOC, "eglMakeCurrent");
@@ -257,22 +256,8 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
}
dpy = ctx->Resource.Display;
- switch (_eglGetContextAPIBit(ctx)) {
- case EGL_OPENGL_ES_BIT:
- surfaceless = dpy->Extensions.KHR_surfaceless_gles1;
- break;
- case EGL_OPENGL_ES2_BIT:
- surfaceless = dpy->Extensions.KHR_surfaceless_gles2;
- break;
- case EGL_OPENGL_BIT:
- surfaceless = dpy->Extensions.KHR_surfaceless_opengl;
- break;
- default:
- surfaceless = EGL_FALSE;
- break;
- }
-
- if (!surfaceless && (draw == NULL || read == NULL))
+ if (!dpy->Extensions.KHR_surfaceless_context
+ && (draw == NULL || read == NULL))
return _eglError(EGL_BAD_MATCH, "eglMakeCurrent");
/*
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 905c7a4f02a..a1dd279bf39 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -103,9 +103,7 @@ struct _egl_extensions
EGLBoolean KHR_reusable_sync;
EGLBoolean KHR_fence_sync;
- EGLBoolean KHR_surfaceless_gles1;
- EGLBoolean KHR_surfaceless_gles2;
- EGLBoolean KHR_surfaceless_opengl;
+ EGLBoolean KHR_surfaceless_context;
EGLBoolean NOK_swap_region;
EGLBoolean NOK_texture_from_pixmap;
diff --git a/src/egl/main/eglmisc.c b/src/egl/main/eglmisc.c
index 9d534f0a5be..b4f1e717701 100644
--- a/src/egl/main/eglmisc.c
+++ b/src/egl/main/eglmisc.c
@@ -107,9 +107,7 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
_EGL_CHECK_EXTENSION(KHR_reusable_sync);
_EGL_CHECK_EXTENSION(KHR_fence_sync);
- _EGL_CHECK_EXTENSION(KHR_surfaceless_gles1);
- _EGL_CHECK_EXTENSION(KHR_surfaceless_gles2);
- _EGL_CHECK_EXTENSION(KHR_surfaceless_opengl);
+ _EGL_CHECK_EXTENSION(KHR_surfaceless_context);
_EGL_CHECK_EXTENSION(NOK_swap_region);
_EGL_CHECK_EXTENSION(NOK_texture_from_pixmap);