mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 11:20:11 +01:00
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 <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
parent
cb77f5dd1f
commit
b50703aea5
6 changed files with 9 additions and 38 deletions
|
|
@ -483,15 +483,11 @@ dri2_setup_screen(_EGLDisplay *disp)
|
||||||
|
|
||||||
if (dri2_dpy->dri2) {
|
if (dri2_dpy->dri2) {
|
||||||
if (dri2_dpy->dri2->base.version >= 2) {
|
if (dri2_dpy->dri2->base.version >= 2) {
|
||||||
disp->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
|
disp->Extensions.KHR_surfaceless_context = EGL_TRUE;
|
||||||
disp->Extensions.KHR_surfaceless_gles2 = EGL_TRUE;
|
|
||||||
disp->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
assert(dri2_dpy->swrast);
|
assert(dri2_dpy->swrast);
|
||||||
disp->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
|
disp->Extensions.KHR_surfaceless_context = EGL_TRUE;
|
||||||
disp->Extensions.KHR_surfaceless_gles2 = EGL_TRUE;
|
|
||||||
disp->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dri2_dpy->image) {
|
if (dri2_dpy->image) {
|
||||||
|
|
|
||||||
|
|
@ -427,9 +427,7 @@ eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_list,
|
||||||
|
|
||||||
if (!config) {
|
if (!config) {
|
||||||
/* config may be NULL if surfaceless */
|
/* config may be NULL if surfaceless */
|
||||||
if (!disp->Extensions.KHR_surfaceless_gles1 &&
|
if (!disp->Extensions.KHR_surfaceless_context)
|
||||||
!disp->Extensions.KHR_surfaceless_gles2 &&
|
|
||||||
!disp->Extensions.KHR_surfaceless_opengl)
|
|
||||||
RETURN_EGL_ERROR(disp, EGL_BAD_CONFIG, EGL_NO_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);
|
RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_FALSE);
|
||||||
if (!draw_surf || !read_surf) {
|
if (!draw_surf || !read_surf) {
|
||||||
/* surfaces may be NULL if surfaceless */
|
/* surfaces may be NULL if surfaceless */
|
||||||
if (!disp->Extensions.KHR_surfaceless_gles1 &&
|
if (!disp->Extensions.KHR_surfaceless_context)
|
||||||
!disp->Extensions.KHR_surfaceless_gles2 &&
|
|
||||||
!disp->Extensions.KHR_surfaceless_opengl)
|
|
||||||
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
|
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
|
||||||
|
|
||||||
if ((!draw_surf && draw != EGL_NO_SURFACE) ||
|
if ((!draw_surf && draw != EGL_NO_SURFACE) ||
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,6 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
|
||||||
_EGLThreadInfo *t = _eglGetCurrentThread();
|
_EGLThreadInfo *t = _eglGetCurrentThread();
|
||||||
_EGLDisplay *dpy;
|
_EGLDisplay *dpy;
|
||||||
EGLint conflict_api;
|
EGLint conflict_api;
|
||||||
EGLBoolean surfaceless;
|
|
||||||
|
|
||||||
if (_eglIsCurrentThreadDummy())
|
if (_eglIsCurrentThreadDummy())
|
||||||
return _eglError(EGL_BAD_ALLOC, "eglMakeCurrent");
|
return _eglError(EGL_BAD_ALLOC, "eglMakeCurrent");
|
||||||
|
|
@ -257,22 +256,8 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
|
||||||
}
|
}
|
||||||
|
|
||||||
dpy = ctx->Resource.Display;
|
dpy = ctx->Resource.Display;
|
||||||
switch (_eglGetContextAPIBit(ctx)) {
|
if (!dpy->Extensions.KHR_surfaceless_context
|
||||||
case EGL_OPENGL_ES_BIT:
|
&& (draw == NULL || read == NULL))
|
||||||
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))
|
|
||||||
return _eglError(EGL_BAD_MATCH, "eglMakeCurrent");
|
return _eglError(EGL_BAD_MATCH, "eglMakeCurrent");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -103,9 +103,7 @@ struct _egl_extensions
|
||||||
EGLBoolean KHR_reusable_sync;
|
EGLBoolean KHR_reusable_sync;
|
||||||
EGLBoolean KHR_fence_sync;
|
EGLBoolean KHR_fence_sync;
|
||||||
|
|
||||||
EGLBoolean KHR_surfaceless_gles1;
|
EGLBoolean KHR_surfaceless_context;
|
||||||
EGLBoolean KHR_surfaceless_gles2;
|
|
||||||
EGLBoolean KHR_surfaceless_opengl;
|
|
||||||
|
|
||||||
EGLBoolean NOK_swap_region;
|
EGLBoolean NOK_swap_region;
|
||||||
EGLBoolean NOK_texture_from_pixmap;
|
EGLBoolean NOK_texture_from_pixmap;
|
||||||
|
|
|
||||||
|
|
@ -107,9 +107,7 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
|
||||||
_EGL_CHECK_EXTENSION(KHR_reusable_sync);
|
_EGL_CHECK_EXTENSION(KHR_reusable_sync);
|
||||||
_EGL_CHECK_EXTENSION(KHR_fence_sync);
|
_EGL_CHECK_EXTENSION(KHR_fence_sync);
|
||||||
|
|
||||||
_EGL_CHECK_EXTENSION(KHR_surfaceless_gles1);
|
_EGL_CHECK_EXTENSION(KHR_surfaceless_context);
|
||||||
_EGL_CHECK_EXTENSION(KHR_surfaceless_gles2);
|
|
||||||
_EGL_CHECK_EXTENSION(KHR_surfaceless_opengl);
|
|
||||||
|
|
||||||
_EGL_CHECK_EXTENSION(NOK_swap_region);
|
_EGL_CHECK_EXTENSION(NOK_swap_region);
|
||||||
_EGL_CHECK_EXTENSION(NOK_texture_from_pixmap);
|
_EGL_CHECK_EXTENSION(NOK_texture_from_pixmap);
|
||||||
|
|
|
||||||
|
|
@ -583,9 +583,7 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy)
|
||||||
dpy->Extensions.KHR_reusable_sync = EGL_TRUE;
|
dpy->Extensions.KHR_reusable_sync = EGL_TRUE;
|
||||||
dpy->Extensions.KHR_fence_sync = EGL_TRUE;
|
dpy->Extensions.KHR_fence_sync = EGL_TRUE;
|
||||||
|
|
||||||
dpy->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
|
dpy->Extensions.KHR_surfaceless_context = EGL_TRUE;
|
||||||
dpy->Extensions.KHR_surfaceless_gles2 = EGL_TRUE;
|
|
||||||
dpy->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
|
|
||||||
|
|
||||||
if (dpy->Platform == _EGL_PLATFORM_DRM) {
|
if (dpy->Platform == _EGL_PLATFORM_DRM) {
|
||||||
dpy->Extensions.MESA_drm_display = EGL_TRUE;
|
dpy->Extensions.MESA_drm_display = EGL_TRUE;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue