diff options
author | Dave Parks <davep@lindenlab.com> | 2021-12-03 15:07:31 +0000 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2021-12-03 15:07:31 +0000 |
commit | e7830b39f01d9f9c82e9e2029634dffb8386b24e (patch) | |
tree | 4be81717808f245e62cc7a76b5c148b2096472a1 /indra/newview/pipeline.cpp | |
parent | 511de439a35ddb22c6f174b85c599d4881b9c139 (diff) |
SL-16436 and SL-16327 Fix for RenderDebugGL test failures and fix for grey textures
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c122b4f43e..df676b30fc 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3711,25 +3711,31 @@ void renderSoundHighlights(LLDrawable* drawablep) } } -void LLPipeline::touchTextures(LLDrawInfo* info) +void LLPipeline::touchTexture(LLViewerTexture* tex, F32 vsize) { - LL_PROFILE_ZONE_SCOPED; - for (auto& tex : info->mTextureList) + if (tex) { - if (tex.notNull()) + LLImageGL* gl_tex = tex->getGLTexture(); + if (gl_tex && gl_tex->updateBindStats(gl_tex->mTextureMemory)) { - LLImageGL* gl_tex = tex->getGLTexture(); - if (gl_tex && gl_tex->updateBindStats(gl_tex->mTextureMemory)) - { - tex->setActive(); - } + tex->setActive(); + tex->addTextureStats(vsize); } } - if (info->mTexture.notNull()) + +} +void LLPipeline::touchTextures(LLDrawInfo* info) +{ + LL_PROFILE_ZONE_SCOPED; + for (int i = 0; i < info->mTextureList.size(); ++i) { - info->mTexture->addTextureStats(info->mVSize); + touchTexture(info->mTextureList[i], info->mTextureListVSize[i]); } + + touchTexture(info->mTexture, info->mVSize); + touchTexture(info->mSpecularMap, info->mVSize); + touchTexture(info->mNormalMap, info->mVSize); } void LLPipeline::postSort(LLCamera& camera) |