Commit ba694484 by Shannon Woods

Fixes handling in eglMakeCurrent to allow for null displays.

TRAC #23577 On behalf of callow.mark@artspark.co.jp Landed-by: Shannon Woods Signed-off-by: Jamie Madill Signed-off-by: Geoff Lang
parent 2ccad064
...@@ -888,6 +888,8 @@ EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface ...@@ -888,6 +888,8 @@ EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface
return EGL_FALSE; return EGL_FALSE;
} }
if (dpy != EGL_NO_DISPLAY)
{
rx::Renderer *renderer = display->getRenderer(); rx::Renderer *renderer = display->getRenderer();
if (renderer->testDeviceLost(true)) if (renderer->testDeviceLost(true))
{ {
...@@ -898,6 +900,7 @@ EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface ...@@ -898,6 +900,7 @@ EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface
{ {
return egl::error(EGL_CONTEXT_LOST, EGL_FALSE); return egl::error(EGL_CONTEXT_LOST, EGL_FALSE);
} }
}
if ((draw != EGL_NO_SURFACE && !validateSurface(display, static_cast<egl::Surface*>(draw))) || if ((draw != EGL_NO_SURFACE && !validateSurface(display, static_cast<egl::Surface*>(draw))) ||
(read != EGL_NO_SURFACE && !validateSurface(display, static_cast<egl::Surface*>(read)))) (read != EGL_NO_SURFACE && !validateSurface(display, static_cast<egl::Surface*>(read))))
......
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