Commit 9b6a63a0 authored by Chia-I Wu's avatar Chia-I Wu

st/egl: Add support for EGL_KHR_surfaceless_*.

parent 41c095bf
...@@ -533,6 +533,10 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy, ...@@ -533,6 +533,10 @@ 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_gles2 = EGL_TRUE;
dpy->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
if (egl_g3d_add_configs(drv, dpy, 1) == 1) { if (egl_g3d_add_configs(drv, dpy, 1) == 1) {
_eglError(EGL_NOT_INITIALIZED, "eglInitialize(unable to add configs)"); _eglError(EGL_NOT_INITIALIZED, "eglInitialize(unable to add configs)");
goto fail; goto fail;
......
...@@ -104,7 +104,7 @@ egl_g3d_create_context(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, ...@@ -104,7 +104,7 @@ egl_g3d_create_context(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
} }
gctx->stctxi = gctx->stapi->create_context(gctx->stapi, gdpy->smapi, gctx->stctxi = gctx->stapi->create_context(gctx->stapi, gdpy->smapi,
&gconf->stvis, (gshare) ? gshare->stctxi : NULL); (gconf) ? &gconf->stvis : NULL, (gshare) ? gshare->stctxi : NULL);
if (!gctx->stctxi) { if (!gctx->stctxi) {
FREE(gctx); FREE(gctx);
return NULL; return NULL;
...@@ -438,16 +438,19 @@ egl_g3d_make_current(_EGLDriver *drv, _EGLDisplay *dpy, ...@@ -438,16 +438,19 @@ egl_g3d_make_current(_EGLDriver *drv, _EGLDisplay *dpy,
ok = gctx->stapi->make_current(gctx->stapi, gctx->stctxi, ok = gctx->stapi->make_current(gctx->stapi, gctx->stctxi,
(gdraw) ? gdraw->stfbi : NULL, (gread) ? gread->stfbi : NULL); (gdraw) ? gdraw->stfbi : NULL, (gread) ? gread->stfbi : NULL);
if (ok) { if (ok) {
gctx->stctxi->notify_invalid_framebuffer(gctx->stctxi, gdraw->stfbi); if (gdraw) {
if (gread != gdraw) {
gctx->stctxi->notify_invalid_framebuffer(gctx->stctxi, gctx->stctxi->notify_invalid_framebuffer(gctx->stctxi,
gread->stfbi); gdraw->stfbi);
}
if (gdraw->base.Type == EGL_WINDOW_BIT) { if (gdraw->base.Type == EGL_WINDOW_BIT) {
gctx->base.WindowRenderBuffer = gctx->base.WindowRenderBuffer =
(gdraw->stvis.render_buffer == ST_ATTACHMENT_FRONT_LEFT) ? (gdraw->stvis.render_buffer == ST_ATTACHMENT_FRONT_LEFT) ?
EGL_SINGLE_BUFFER : EGL_BACK_BUFFER; EGL_SINGLE_BUFFER : EGL_BACK_BUFFER;
}
}
if (gread && gread != gdraw) {
gctx->stctxi->notify_invalid_framebuffer(gctx->stctxi,
gread->stfbi);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment