if (dri2_dpy->dri2) {
if (dri2_dpy->dri2->base.version >= 2) {
- disp->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
- disp->Extensions.KHR_surfaceless_gles2 = EGL_TRUE;
- disp->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
+ disp->Extensions.KHR_surfaceless_context = EGL_TRUE;
}
} else {
assert(dri2_dpy->swrast);
- disp->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
- disp->Extensions.KHR_surfaceless_gles2 = EGL_TRUE;
- disp->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
+ disp->Extensions.KHR_surfaceless_context = EGL_TRUE;
}
if (dri2_dpy->image) {
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);
}
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) ||
_EGLThreadInfo *t = _eglGetCurrentThread();
_EGLDisplay *dpy;
EGLint conflict_api;
- EGLBoolean surfaceless;
if (_eglIsCurrentThreadDummy())
return _eglError(EGL_BAD_ALLOC, "eglMakeCurrent");
}
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");
/*
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;
_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);
dpy->Extensions.KHR_reusable_sync = EGL_TRUE;
dpy->Extensions.KHR_fence_sync = EGL_TRUE;
- dpy->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
- dpy->Extensions.KHR_surfaceless_gles2 = EGL_TRUE;
- dpy->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
+ dpy->Extensions.KHR_surfaceless_context = EGL_TRUE;
if (dpy->Platform == _EGL_PLATFORM_DRM) {
dpy->Extensions.MESA_drm_display = EGL_TRUE;