[Mesa-dev] [PATCH] swrast: Fix eglMakeCurrent(dpy, NULL, NULL, ctx)
ajax at redhat.com
Fri Jul 6 15:45:45 UTC 2018
On Fri, 2018-07-06 at 10:29 +0100, Emil Velikov wrote:
> Skimming through the egl_khr_create_context text, this relaxes some
> parts which are meant to be an error.
> For example
> * If either of <draw> or <read> is a valid surface and the other
> is EGL_NO_SURFACE, an EGL_BAD_MATCH error is generated.
That seems like an invariant EGL promises for the driver, not something
the driver validates. eglMakeCurrent already says:
if ((!draw_surf && draw != EGL_NO_SURFACE) ||
(!read_surf && read != EGL_NO_SURFACE))
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
glXMakeCurrent doesn't seem to have code to generate an error in that
case, anymore. The server would throw an error for the GLXMakeCurrent
request, but we don't always emit those for... bad reasons. Regardless
I'd say that check belongs in MakeContextCurrent, not the driver.
More information about the mesa-dev