Commit ac4109a3 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 82ff2b36
...@@ -891,6 +891,8 @@ EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface ...@@ -891,6 +891,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))
{ {
...@@ -901,6 +903,7 @@ EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface ...@@ -901,6 +903,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