From 1f754e50908ba325c132b8d83383f7f0dbbdf793 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 6 Sep 2024 16:39:58 -0500 Subject: #2467 Fix for sim surrounds not fully loading (#2524) Also fixes some sculpts getting wrong LoD --- indra/newview/llvovolume.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'indra/newview/llvovolume.cpp') 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()); } } -- cgit v1.2.3