diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2021-11-23 20:39:32 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2021-11-23 20:39:32 -0500 |
commit | 2b96f89c2a374d72c0a8bc28a7b06ad4db7eae6e (patch) | |
tree | 00a275eefc21861b5ec70c50fb75235411f1ffa6 /indra/llrender | |
parent | 6d36038e4098ebe7334284fc9b3fb76bc116c106 (diff) |
SL-16400: Add ThreadPool::start() method, and call it.
It's sometimes important to finish other initialization before launching the
threads in the ThreadPool, so make that an explicit step. In particular, we
were launching the LLImageGL texture thread before initializing the GL
context, resulting in all gray textures.
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llimagegl.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index eda61d3c74..894eb8c773 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -2261,6 +2261,7 @@ LLImageGLThread::LLImageGLThread(LLWindow* window) mFinished = false; mContext = mWindow->createSharedContext(); + ThreadPool::start(); } void LLImageGLThread::run() @@ -2268,10 +2269,6 @@ void LLImageGLThread::run() LL_PROFILE_ZONE_SCOPED; // We must perform setup on this thread before actually servicing our // 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); gGL.init(); ThreadPool::run(); |