diff options
| author | Dave Parks <davep@lindenlab.com> | 2022-02-23 16:51:33 -0600 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2022-02-23 16:51:33 -0600 | 
| commit | d9a68339d5aa18af349e347d6ed74bc01824cec7 (patch) | |
| tree | cb8dd1c146499d57daa6798495a7540c691bdddb /indra/newview | |
| parent | 65a28c5d7dc54dc9e263da4b19229fb5f86a1c62 (diff) | |
SL-16815 and SL-16906 Avoid redundant bumpmap generation, add some assertions around ref counting and (hack) fix crash on shutdown from dangling texture reference (reduced to 1 dangling texture from several hundred, can't find the remaining reference).
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/lldrawpoolbump.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 3 | 
2 files changed, 3 insertions, 4 deletions
| diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 2b151487fd..1d5419b515 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -1051,8 +1051,8 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI  			}  		} -		//if (iter->second->getWidth() != src->getWidth() || -		//	iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution +		if (iter->second->getWidth() != src->getWidth() || +			iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution  		{  			LLPointer<LLImageRaw> dst_image = new LLImageRaw(src->getWidth(), src->getHeight(), 1);  			U8* dst_data = dst_image->getData(); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index fa2c070ea0..e3ac56d0d3 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1619,7 +1619,6 @@ void LLViewerFetchedTexture::scheduleCreateTexture()          mNeedsCreateTexture = TRUE;          if (preCreateTexture())          { -            ref();  #if LL_IMAGEGL_THREAD_CHECK              //grab a copy of the raw image data to make sure it isn't modified pending texture creation              U8* data = mRawImage->getData(); @@ -1635,6 +1634,7 @@ void LLViewerFetchedTexture::scheduleCreateTexture()              auto mainq = LLImageGLThread::sEnabled ? mMainQueue.lock() : nullptr;              if (mainq)              { +                ref();                  mainq->postTo(                      mImageQueue,                      // work to be done on LLImageGL worker thread @@ -1681,7 +1681,6 @@ void LLViewerFetchedTexture::scheduleCreateTexture()              else              {                  gTextureList.mCreateTextureList.insert(this); -                unref();              }          }      } | 
