diff options
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
| -rw-r--r-- | indra/newview/llviewerobject.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 7c26cb3c9f..4e4282a8ca 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -5229,7 +5229,20 @@ void LLViewerObject::setTE(const U8 te, const LLTextureEntry& texture_entry) const LLUUID& image_id = getTE(te)->getID(); LLViewerTexture* bakedTexture = getBakedTextureForMagicId(image_id); - mTEImages[te] = bakedTexture ? bakedTexture : LLViewerTextureManager::getFetchedTexture(image_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + if (bakedTexture) + { + mTEImages[te] = bakedTexture; + } + else + { + LLViewerFetchedTexture* img = LLViewerTextureManager::getFetchedTexture(image_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + // Same creation seed the PBR path applies in updateTEMaterialTextures' + // fetch_texture - without it a Blinn texture has decode_priority 0 and + // cannot even fetch headers until its first coverage measurement, + // while the equivalent PBR texture starts fetching immediately. + img->addTextureStats(64.f * 64.f, true); + mTEImages[te] = img; + } updateAvatarMeshVisibility(image_id, old_image_id); @@ -5240,11 +5253,14 @@ void LLViewerObject::updateTEMaterialTextures(U8 te) { if (getTE(te)->getMaterialParams().notNull()) { + // Same creation seed as the PBR fetch_texture below - see setTE. const LLUUID& norm_id = getTE(te)->getMaterialParams()->getNormalID(); mTENormalMaps[te] = LLViewerTextureManager::getFetchedTexture(norm_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mTENormalMaps[te]->addTextureStats(64.f * 64.f, true); const LLUUID& spec_id = getTE(te)->getMaterialParams()->getSpecularID(); mTESpecularMaps[te] = LLViewerTextureManager::getFetchedTexture(spec_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mTESpecularMaps[te]->addTextureStats(64.f * 64.f, true); } LLFetchedGLTFMaterial* mat = (LLFetchedGLTFMaterial*) getTE(te)->getGLTFRenderMaterial(); |
