Commit cc5c7d9c by Nicolas Capens

Delete thread data at eglReleaseThread.

Bug 29279831 Change-Id: If5dbcb3e32e88d1e574d45d3368ed114fd4f85b7 Reviewed-on: https://swiftshader-review.googlesource.com/5581Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent af93a429
...@@ -485,7 +485,7 @@ EGLBoolean ReleaseThread(void) ...@@ -485,7 +485,7 @@ EGLBoolean ReleaseThread(void)
{ {
TRACE("()"); TRACE("()");
eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_CONTEXT, EGL_NO_SURFACE, EGL_NO_SURFACE); detachThread();
return success(EGL_TRUE); return success(EGL_TRUE);
} }
......
...@@ -62,7 +62,10 @@ void detachThread() ...@@ -62,7 +62,10 @@ void detachThread()
{ {
TRACE("()"); TRACE("()");
eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_CONTEXT, EGL_NO_SURFACE, EGL_NO_SURFACE);
delete (Current*)sw::Thread::getLocalStorage(currentTLS); delete (Current*)sw::Thread::getLocalStorage(currentTLS);
sw::Thread::setLocalStorage(currentTLS, nullptr);
} }
CONSTRUCTOR void attachProcess() CONSTRUCTOR void attachProcess()
......
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