When surfaceless contexts are in use (for example, for FBO rendering), eglWaitClient return an error EGL_BAD_CURRENT_SURFACE. According to spec it should do glFinish()-like behavior disregarding if it has bound surface to the context or not. In case of using DRI2 backend it happens that in case of surfaceless context dri2_wait_client() is not called at all and aborted at _eglWaitClientCommon() function with following check: /* let bad current context imply bad current surface */ if (_eglGetContextHandle(ctx) == EGL_NO_CONTEXT || _eglGetSurfaceHandle(ctx->DrawSurface) == EGL_NO_SURFACE) RETURN_EGL_ERROR(disp, EGL_BAD_CURRENT_SURFACE, EGL_FALSE);
EGL spec says following: "If a surface associated with the calling thread’s current context is no longer valid, an EGL_BAD_CURRENT_SURFACE error is generated." Having zero mention of surfaceless context here seems like a spec bug to me. When surfaceless was brought part of spec it seems it only touched MakeCurrent.
I've filed following bug for discussion: https://gitlab.khronos.org/egl/API/issues/12
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/163.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.