summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-07-07 20:49:46 +0800
committerErik Kundiman <erik@megapahit.org>2026-07-07 20:49:46 +0800
commitc659a085f05f5a9f62abf8a4c2e394d910af4ae9 (patch)
tree4e18706c29a8d0d95078c438b67b2e7a81f24005 /indra/newview/llviewerobject.cpp
parent2121d3b20269baeb8bb88cef534307628f1adb2e (diff)
parent3d465f6c966f0a2fcfd5d3c9effb6ce20c2754c8 (diff)
Merge tag 'Second_Life_Release#3d465f6c-26.3' into 26.3
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 7f51ad1065..4fbb83f51e 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -5230,7 +5230,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);
@@ -5241,11 +5254,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();