OSDN Git Service

Fix setting the EGL context.
authorNicolas Capens <capn@google.com>
Sun, 26 Oct 2014 19:26:12 +0000 (15:26 -0400)
committerNicolas Capens <nicolascapens@google.com>
Sun, 26 Oct 2014 19:27:17 +0000 (19:27 +0000)
BUG=18121988

Change-Id: If0072d742a8d3d0bd872d9d60f9e68ad7eda4d1a
Reviewed-on: https://swiftshader-review.googlesource.com/1251
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
src/GLES2/libEGL/libEGL.cpp
src/GLES2/libEGL/main.cpp

index 49ee1d6..7b19527 100644 (file)
@@ -871,6 +871,7 @@ EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurfac
         egl::setCurrentDisplay(dpy);\r
         egl::setCurrentDrawSurface(draw);\r
         egl::setCurrentReadSurface(read);\r
+               egl::setCurrentContext(ctx);\r
 \r
         gl::makeCurrent(context, display, static_cast<egl::Surface*>(draw));\r
 \r
index c90e1f4..dfbfee1 100644 (file)
@@ -42,6 +42,7 @@ static void eglAttachThread()
         current->display = EGL_NO_DISPLAY;\r
         current->drawSurface = EGL_NO_SURFACE;\r
         current->readSurface = EGL_NO_SURFACE;\r
+               current->context = EGL_NO_CONTEXT;\r
        }\r
 }\r
 \r