diff options
| author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2026-07-07 08:06:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-07 08:06:22 -0400 |
| commit | 3d465f6c966f0a2fcfd5d3c9effb6ce20c2754c8 (patch) | |
| tree | 6e54cc193b39ab8ded12f4fa343ada52f75b0c61 /indra/newview/llviewerobject.cpp | |
| parent | f2c356fc7130ce5e38b994dcfa1e210609b458b9 (diff) | |
| parent | b8762cb7999197f7da36b4820761298e85bdfa6f (diff) | |
Merge pull request #5982 from secondlife/geenz/texture-streaming-tweaks
Geenz/texture streaming tweaks
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(); |
