Commit 66954c9a by Nicolas Capens Committed by Nicolas Capens

Fix libGL build.

This does not fix the OGLSimpleCube sample. See swiftshader:81. Change-Id: I4bb5755d8b63f234965c3d12f774706968f2d34e Reviewed-on: https://swiftshader-review.googlesource.com/12088Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 4ad365b4
......@@ -36,12 +36,10 @@ static void glAttachThread()
{
TRACE("()");
gl::Current *current = new gl::Current;
gl::Current *current = (gl::Current*)sw::Thread::allocateLocalStorage(currentTLS, sizeof(gl::Current));
if(current)
{
sw::Thread::setLocalStorage(currentTLS, current);
current->context = nullptr;
current->display = nullptr;
current->drawSurface = nullptr;
......@@ -55,8 +53,7 @@ static void glDetachThread()
wglMakeCurrent(NULL, NULL);
delete (gl::Current*)sw::Thread::getLocalStorage(currentTLS);
sw::Thread::setLocalStorage(currentTLS, nullptr);
sw::Thread::freeLocalStorage(currentTLS);
}
CONSTRUCTOR static bool glAttachProcess()
......
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