summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-09-06 16:39:58 -0500
committerGitHub <noreply@github.com>2024-09-06 16:39:58 -0500
commit1f754e50908ba325c132b8d83383f7f0dbbdf793 (patch)
treeb43c0ac56fde2713a332eaa1f7f16c9595429e7c /indra/newview/llvovolume.cpp
parenta861e86398e5d3fde9ffb388b2ccfc3624b3a5f7 (diff)
#2467 Fix for sim surrounds not fully loading (#2524)
Also fixes some sculpts getting wrong LoD
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 669ccb0924..6cd38078bf 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1149,7 +1149,7 @@ void LLVOVolume::updateSculptTexture()
{
mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_SCULPTED, LLViewerTexture::LOD_TEXTURE);
mSculptTexture->forceToSaveRawImage(0, F32_MAX);
- mSculptTexture->addTextureStats(256.f*256.f);
+ mSculptTexture->setKnownDrawSize(256, 256);
}
mSkinInfoUnavaliable = false;
@@ -1251,7 +1251,7 @@ void LLVOVolume::sculpt()
discard_level = mSculptTexture->getSavedRawImageLevel();
}
- if (!raw_image)
+ if (!raw_image || raw_image->getWidth() < mSculptTexture->getWidth() || raw_image->getHeight() < mSculptTexture->getHeight())
{
// last resort, read back from GL
mSculptTexture->readbackRawImage();
@@ -1338,17 +1338,8 @@ void LLVOVolume::sculpt()
mSculptTexture->updateBindStatsForTester() ;
}
}
- getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level, mSculptTexture->isMissingAsset());
- //notify rebuild any other VOVolumes that reference this sculpty volume
- for (S32 i = 0; i < mSculptTexture->getNumVolumes(LLRender::SCULPT_TEX); ++i)
- {
- LLVOVolume* volume = (*(mSculptTexture->getVolumeList(LLRender::SCULPT_TEX)))[i];
- if (volume != this && volume->getVolume() == getVolume())
- {
- gPipeline.markRebuild(volume->mDrawable, LLDrawable::REBUILD_GEOMETRY);
- }
- }
+ getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level, mSculptTexture->isMissingAsset());
}
}