Skip to content
Snippets Groups Projects
Commit 744646eb authored by David Parks's avatar David Parks
Browse files

SL-16400 Fix for grey textures (hack).

parent 9b0d8c7e
No related branches found
No related tags found
No related merge requests found
...@@ -2268,6 +2268,10 @@ void LLImageGLThread::run() ...@@ -2268,6 +2268,10 @@ void LLImageGLThread::run()
LL_PROFILE_ZONE_SCOPED; LL_PROFILE_ZONE_SCOPED;
// We must perform setup on this thread before actually servicing our // We must perform setup on this thread before actually servicing our
// WorkQueue, likewise cleanup afterwards. // WorkQueue, likewise cleanup afterwards.
while (mContext == nullptr)
{ // HACK -- wait for mContext to be initialized since this thread will usually start before mContext is set
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
mWindow->makeContextCurrent(mContext); mWindow->makeContextCurrent(mContext);
gGL.init(); gGL.init();
ThreadPool::run(); ThreadPool::run();
......
...@@ -324,7 +324,7 @@ class LLImageGLThread : public LLSimpleton<LLImageGLThread>, LL::ThreadPool ...@@ -324,7 +324,7 @@ class LLImageGLThread : public LLSimpleton<LLImageGLThread>, LL::ThreadPool
private: private:
LLWindow* mWindow; LLWindow* mWindow;
void* mContext; void* mContext = nullptr;
LLAtomicBool mFinished; LLAtomicBool mFinished;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment