diff --git a/autobuild.xml b/autobuild.xml index d17fb64726..7d0cc8271e 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1743,11 +1743,11 @@ creds github hash - 755a3de464149ae88b048f976828a8c0c46e3bdb + 9e59c93c7110e87b4ff3db330f11a23c50e5000f hash_algorithm sha1 url - https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/172966323 + https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/178910560 name darwin64 @@ -1759,11 +1759,11 @@ creds github hash - 813e7b5e294d7958e3d69e2252752ff346953b0c + 7ed994db5bafa9a7ad09a1b53da850a84715c65e hash_algorithm sha1 url - https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/172966322 + https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/178910561 name linux64 @@ -1775,18 +1775,18 @@ creds github hash - 67f647538b1b49d0152fd9d03cfb9bdf978e33d1 + 66824c02e0e5eabbfbe37bfb173360195f89697c hash_algorithm sha1 url - https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/172966328 + https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/178910562 name windows64 version - 1.0.b8b1f73 + 1.0.66e6919 llphysicsextensions_stub diff --git a/doc/testplans/pbr_terrain_composition.md b/doc/testplans/pbr_terrain_composition.md index 450e887390..bac0e8662e 100644 --- a/doc/testplans/pbr_terrain_composition.md +++ b/doc/testplans/pbr_terrain_composition.md @@ -44,6 +44,8 @@ The PBR terrain texture transform flag should be set automatically when logging When the PBR terrain texture transform feature is enabled, the UI of the Terrain tab should be overhauled. Availability of features depends on the type of terrain. +**Known issue:** The Region/Estate floater may have to be closed/reopened a second time in order for the UI overhaul to take effect, after teleporting between regions that do and do not have the feature flag set. + When "PBR Metallic Roughness" is checked: - There should be a way for the user to change the texture transforms for the terrain in the current region diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h index 369d65407e..c3820ae987 100644 --- a/indra/llcommon/llcoros.h +++ b/indra/llcommon/llcoros.h @@ -31,8 +31,9 @@ #include "llexception.h" #include -#include #include +#include +#include #include "mutex.h" #include "llsingleton.h" #include "llinstancetracker.h" @@ -307,6 +308,12 @@ public: // use mutex, lock, condition_variable suitable for coroutines using Mutex = boost::fibers::mutex; + using RMutex = boost::fibers::recursive_mutex; + // With C++17, LockType is deprecated: at this point we can directly + // declare 'std::unique_lock lk(some_mutex)' without explicitly stating + // the mutex type. Sadly, making LockType an alias template for + // std::unique_lock doesn't work the same way: Class Template Argument + // Deduction only works for class templates, not alias templates. using LockType = std::unique_lock; using cv_status = boost::fibers::cv_status; using ConditionVariable = boost::fibers::condition_variable; diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index e1ddd13e6c..4bb176e653 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -55,7 +55,6 @@ #include "llsingleton.h" #include "llstl.h" #include "lltimer.h" -#include // On Mac, got: // #error "Boost.Stacktrace requires `_Unwind_Backtrace` function. Define @@ -512,7 +511,7 @@ namespace LLError::TimeFunction mTimeFunction; Recorders mRecorders; - boost::fibers::recursive_mutex mRecorderMutex; + LLCoros::RMutex mRecorderMutex; int mShouldLogCallCounter; diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index f190f293bb..e5d3accd2c 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5511,7 +5511,11 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents) U32 stream_count = data.w.empty() ? 4 : 5; - S32 vert_count = static_cast(meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count)); + S32 vert_count = 0; + if (!data.p.empty()) + { + vert_count = static_cast(meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count)); + } if (vert_count < 65535 && vert_count != 0) { diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 95ac76f2ce..11b24d4974 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1385,7 +1385,7 @@ bool LLWindowWin32::switchContext(bool fullscreen, const LLCoordScreen& size, bo gGLManager.initWGL(); - if (wglChoosePixelFormatARB) + if (wglChoosePixelFormatARB && wglGetPixelFormatAttribivARB) { // OK, at this point, use the ARB wglChoosePixelFormatsARB function to see if we // can get exactly what we want. diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index fca0f1adc4..5576d68550 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12830,7 +12830,7 @@ Change of this parameter will affect the layout of buttons in notification toast RenderTerrainPBREnabled Comment - EXPERIMENTAL: Enable PBR Terrain features. + Enable PBR Terrain features. Persist 1 Type diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index 5ba5951064..c210b9c61d 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -991,6 +991,12 @@ bool Image::prep(Asset& asset) return false; } + if (!asset.mFilename.empty()) + { // local preview, boost image so it doesn't discard and force to save raw image in case we save out or upload + mTexture->setBoostLevel(LLViewerTexture::BOOST_PREVIEW); + mTexture->forceToSaveRawImage(0, F32_MAX); + } + return true; } diff --git a/indra/newview/gltf/primitive.cpp b/indra/newview/gltf/primitive.cpp index e1579374d4..81caff8ab2 100644 --- a/indra/newview/gltf/primitive.cpp +++ b/indra/newview/gltf/primitive.cpp @@ -109,7 +109,7 @@ struct MikktMesh for (U32 tri_idx = 0; tri_idx < U32(triangle_count); ++tri_idx) { - U32 idx[3]; + U32 idx[3] = {0, 0, 0}; if (prim->mMode == Primitive::Mode::TRIANGLES) { diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp index 050d7b050a..24b06e48e2 100644 --- a/indra/newview/gltfscenemanager.cpp +++ b/indra/newview/gltfscenemanager.cpp @@ -148,6 +148,16 @@ void GLTFSceneManager::uploadSelection() raw = image.mTexture->getRawImage(); } + if (raw.isNull()) + { + raw = image.mTexture->getSavedRawImage(); + } + + if (raw.isNull()) + { + image.mTexture->readbackRawImage(); + } + if (raw.notNull()) { LLPointer j2c = LLViewerTextureList::convertToUploadFile(raw); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 33c9ca66a6..0c41aded5d 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -543,7 +543,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel->getChild("block_fly_over_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_FLYOVER)); panel->getChild("allow_damage_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_ALLOW_DAMAGE)); panel->getChild("restrict_pushobject")->setValue(is_flag_set(region_flags, REGION_FLAGS_RESTRICT_PUSHOBJECT)); - panel->getChild("allow_land_resell_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_LAND_RESELL)); + panel->getChild("allow_land_resell_check")->setValue(!is_flag_set(region_flags, REGION_FLAGS_BLOCK_LAND_RESELL)); panel->getChild("allow_parcel_changes_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_ALLOW_PARCEL_CHANGES)); panel->getChild("block_parcel_search_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_PARCEL_SEARCH)); panel->getChild("agent_limit_spin")->setValue(LLSD((F32)agent_limit)); diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index f3ce893c2a..fdd82fae23 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -67,7 +67,11 @@ bool LLFloaterSpellCheckerSettings::postBuild(void) LLSpellChecker::setSettingsChangeCallback(boost::bind(&LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange, this)); getChild("spellcheck_remove_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnRemove, this)); getChild("spellcheck_import_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnImport, this)); - getChild("spellcheck_main_combo")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaries, this, false)); + getChild("spellcheck_main_combo")->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& data) + { + mMainSelectionChanged = true; + refreshDictionaries(false); + }); getChild("spellcheck_moveleft_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_active_list", "spellcheck_available_list")); getChild("spellcheck_moveright_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_available_list", "spellcheck_active_list")); center(); @@ -129,7 +133,7 @@ void LLFloaterSpellCheckerSettings::onBtnRemove() void LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange() { - refreshDictionaries(true); + refreshDictionaries(!mMainSelectionChanged); } void LLFloaterSpellCheckerSettings::refreshDictionaries(bool from_settings) diff --git a/indra/newview/llfloaterspellchecksettings.h b/indra/newview/llfloaterspellchecksettings.h index 5be1716f36..b240b70870 100644 --- a/indra/newview/llfloaterspellchecksettings.h +++ b/indra/newview/llfloaterspellchecksettings.h @@ -46,6 +46,8 @@ protected: void onSpellCheckSettingsChange(); void refreshDictionaries(bool from_settings); + bool mMainSelectionChanged{ false }; + private: void commitChanges(); }; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d6f372e7e2..ca10684467 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -411,8 +411,10 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg) // 4. Toast if ((("toast" == user_preferences) && (ON_TOP_AND_ITEM_IS_SELECTED != conversations_floater_status) && - (!session_floater->isTornOff() || !LLFloater::isVisible(session_floater))) - || !session_floater->isMessagePaneExpanded()) + (!session_floater->isTornOff() + || session_floater->isMinimized() + || !LLFloater::isVisible(session_floater))) + || !session_floater->isMessagePaneExpanded()) { //Show IM toasts (upper right toasts) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 774812bcfd..1014bc951c 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -304,14 +304,9 @@ LLEditWearableDictionary::Subparts::Subparts() addEntry(SUBPART_UNDERSHIRT, new SubpartEntry(SUBPART_UNDERSHIRT, "mTorso", "undershirt", "undershirt_main_param_list", "undershirt_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH)); addEntry(SUBPART_UNDERPANTS, new SubpartEntry(SUBPART_UNDERPANTS, "mPelvis", "underpants", "underpants_main_param_list", "underpants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); addEntry(SUBPART_SKIRT, new SubpartEntry(SUBPART_SKIRT, "mPelvis", "skirt", "skirt_main_param_list", "skirt_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH)); - // Alpha, tattoo and universal don't adhere to the usual panel layout and don't have a param list and main tab - //addEntry(SUBPART_ALPHA, new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "alpha_main_param_list", "alpha_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); - //addEntry(SUBPART_TATTOO, new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "tattoo_main_param_list", "tattoo_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); - //addEntry(SUBPART_UNIVERSAL, new SubpartEntry(SUBPART_UNIVERSAL, "mPelvis", "universal", "universal_main_param_list", "universal_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f), SEX_BOTH)); addEntry(SUBPART_ALPHA, new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "", "", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); addEntry(SUBPART_TATTOO, new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "", "", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH)); addEntry(SUBPART_UNIVERSAL, new SubpartEntry(SUBPART_UNIVERSAL, "mPelvis", "universal", "", "", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f), SEX_BOTH)); - // // WT_PHYSIC addEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, "mTorso", "physics_breasts_updown", "physics_breasts_updown_param_list", "physics_breasts_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE)); @@ -821,19 +816,12 @@ bool LLPanelEditWearable::postBuild() continue; } - const std::string accordion_tab = subpart_entry->mAccordionTab; - - // Alpha and tattoo don't adhere to the usual panel layout and don't have a param list and main tab - // We can safely skip here as the wearables having no accordion tabs only have one sub-part, - // so no camera switch is needed - //LLAccordionCtrlTab *tab = getChild(accordion_tab); + const std::string& accordion_tab = subpart_entry->mAccordionTab; if (accordion_tab.empty()) { continue; } LLAccordionCtrlTab *tab = findChild(accordion_tab); - // - if (!tab) { LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL; @@ -1271,20 +1259,16 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, bool show, bo continue; } - const std::string scrolling_panel = subpart_entry->mParamList; - const std::string accordion_tab = subpart_entry->mAccordionTab; + const std::string& scrolling_panel = subpart_entry->mParamList; + const std::string& accordion_tab = subpart_entry->mAccordionTab; - // Alpha and tattoo don't adhere to the usual panel layout and don't have a param list and main tab - // Since there are no sex-based differences, we can skip here if (scrolling_panel.empty() || accordion_tab.empty()) { continue; } - // - - LLScrollingPanelList *panel_list = getChild(scrolling_panel); - LLAccordionCtrlTab *tab = getChild(accordion_tab); + LLScrollingPanelList *panel_list = findChild(scrolling_panel); + LLAccordionCtrlTab *tab = findChild(accordion_tab); if (!panel_list) { LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL; diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index e172e15a0e..5dbd579b45 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -337,8 +337,8 @@ void LLSetKeyBindDialog::onCancel(void* user_data) void LLSetKeyBindDialog::onBlank(void* user_data) { LLSetKeyBindDialog* self = (LLSetKeyBindDialog*)user_data; - // tmp needs 'no key' button - self->setKeyBind(CLICK_NONE, KEY_NONE, MASK_NONE, false); + + self->setKeyBind(CLICK_NONE, KEY_NONE, MASK_NONE, self->pCheckBox->getValue().asBoolean()); self->closeFloater(); } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 555abd2dfd..5a44d48a7d 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1683,6 +1683,11 @@ void render_ui_3d() gObjectList.resetObjectBeacons(); gSky.addSunMoonBeacons(); } + else + { + // Make sure particle effects disappear + LLHUDObject::renderAllForTimer(); + } stop_glerror(); } diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 6f6ff5ac9a..1372dff5ce 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -3382,16 +3382,24 @@ void LLViewerRegion::unpackRegionHandshake() compp->setParamsReady(); } - LLPBRTerrainFeatures::queueQuery(*this, [](LLUUID region_id, bool success, const LLModifyRegion& composition_changes) + std::string cap = getCapability("ModifyRegion"); // needed for queueQuery + if (cap.empty()) { - if (!success) { return; } - LLViewerRegion* region = LLWorld::getInstance()->getRegionFromID(region_id); - if (!region) { return; } - LLVLComposition* compp = region->getComposition(); - if (!compp) { return; } - compp->apply(composition_changes); - LLFloaterRegionInfo::sRefreshFromRegion(region); - }); + LLFloaterRegionInfo::sRefreshFromRegion(this); + } + else + { + LLPBRTerrainFeatures::queueQuery(*this, [](LLUUID region_id, bool success, const LLModifyRegion& composition_changes) + { + if (!success) { return; } + LLViewerRegion* region = LLWorld::getInstance()->getRegionFromID(region_id); + if (!region) { return; } + LLVLComposition* compp = region->getComposition(); + if (!compp) { return; } + compp->apply(composition_changes); + LLFloaterRegionInfo::sRefreshFromRegion(region); + }); + } } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 8b5e51d14d..362416472c 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -63,31 +63,21 @@ #include "llwindow.h" /////////////////////////////////////////////////////////////////////////////// -#include "llmimetypes.h" - -// extern -const S32Megabytes gMinVideoRam(32); -// Texture memory management -//const S32Megabytes gMaxVideoRam(512); -S32Megabytes gMaxVideoRam(512); -// - - // statics -LLPointer LLViewerTexture::sNullImagep = NULL; -LLPointer LLViewerTexture::sBlackImagep = NULL; -LLPointer LLViewerTexture::sCheckerBoardImagep = NULL; -LLPointer LLViewerFetchedTexture::sMissingAssetImagep = NULL; -LLPointer LLViewerFetchedTexture::sWhiteImagep = NULL; -LLPointer LLViewerFetchedTexture::sDefaultImagep = NULL; -LLPointer LLViewerFetchedTexture::sSmokeImagep = NULL; -LLPointer LLViewerFetchedTexture::sFlatNormalImagep = NULL; +LLPointer LLViewerTexture::sNullImagep = nullptr; +LLPointer LLViewerTexture::sBlackImagep = nullptr; +LLPointer LLViewerTexture::sCheckerBoardImagep = nullptr; +LLPointer LLViewerFetchedTexture::sMissingAssetImagep = nullptr; +LLPointer LLViewerFetchedTexture::sWhiteImagep = nullptr; +LLPointer LLViewerFetchedTexture::sDefaultImagep = nullptr; +LLPointer LLViewerFetchedTexture::sSmokeImagep = nullptr; +LLPointer LLViewerFetchedTexture::sFlatNormalImagep = nullptr; LLPointer LLViewerFetchedTexture::sDefaultIrradiancePBRp; // [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0) LLPointer LLViewerFetchedTexture::sDefaultDiffuseImagep = NULL; // [/SL:KB] LLViewerMediaTexture::media_map_t LLViewerMediaTexture::sMediaMap; -LLTexturePipelineTester* LLViewerTextureManager::sTesterp = NULL; +LLTexturePipelineTester* LLViewerTextureManager::sTesterp = nullptr; F32 LLViewerFetchedTexture::sMaxVirtualSize = 8192.f*8192.f; const std::string sTesterName("TextureTester"); @@ -99,11 +89,11 @@ LLFrameTimer LLViewerTexture::sEvaluationTimer; F32 LLViewerTexture::sDesiredDiscardBias = 0.f; S32 LLViewerTexture::sMaxSculptRez = 128; //max sculpt image size -const S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64; +constexpr S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64; const S32 MAX_CACHED_RAW_SCULPT_IMAGE_AREA = LLViewerTexture::sMaxSculptRez * LLViewerTexture::sMaxSculptRez; -const S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128; -const S32 DEFAULT_ICON_DIMENSIONS = 32; -const S32 DEFAULT_THUMBNAIL_DIMENSIONS = 256; +constexpr S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128; +constexpr S32 DEFAULT_ICON_DIMENSIONS = 32; +constexpr S32 DEFAULT_THUMBNAIL_DIMENSIONS = 256; U32 LLViewerTexture::sMinLargeImageSize = 65536; //256 * 256. U32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA; bool LLViewerTexture::sFreezeImageUpdates = false; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 8a8d167067..a320835e68 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -42,12 +42,6 @@ #include #include -extern const S32Megabytes gMinVideoRam; -// Texture memory management -//extern const S32Megabytes gMaxVideoRam; -extern S32Megabytes gMaxVideoRam; -// - // Max texture resolution extern U32 DESIRED_NORMAL_TEXTURE_SIZE; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 5b2efa4893..ca020e263d 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -939,6 +939,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag } LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; + bool onFace = false; for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i) { for (S32 fi = 0; fi < imagep->getNumFaces(i); ++fi) @@ -947,6 +948,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag if (face && face->getViewerObject()) { + onFace = true; F32 radius; F32 cos_angle_to_view_dir; bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius); @@ -1044,7 +1046,8 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag imagep->getLastReferencedTimer()->reset(); //reset texture state. - imagep->setInactive(); + if(!onFace) + imagep->setInactive(); } } diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index dbbda66dba..589c326e63 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -235,8 +235,8 @@ public: bool mForceResetTextureStats; // to make "for (auto& imagep : gTextureList)" work - const image_list_t::iterator begin() const { return mImageList.begin(); } - const image_list_t::iterator end() const { return mImageList.end(); } + const image_list_t::const_iterator begin() const { return mImageList.cbegin(); } + const image_list_t::const_iterator end() const { return mImageList.cend(); } // Fast cache stats static U32 sNumFastCacheReads; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index b20b98ac76..cd4c1bb7cc 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1024,7 +1024,7 @@ bool LLVOAvatarSelf::isValid() const // virtual void LLVOAvatarSelf::idleUpdate(LLAgent &agent, const F64 &time) { - if (isValid()) + if (isAgentAvatarValid()) { LLVOAvatar::idleUpdate(agent, time); idleUpdateTractorBeam(); @@ -1771,7 +1771,7 @@ bool LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) // Make sure the inventory is in sync with the avatar. // Update COF contents, don't trigger appearance update. - if (!isValid()) + if (!isAgentAvatarValid()) { LL_INFOS() << "removeItemLinks skipped, avatar is under destruction" << LL_ENDL; } diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 4e8b840976..17dde9e621 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -130,7 +130,7 @@ private: public: /*virtual*/ bool isSelf() const { return true; } virtual bool isBuddy() const { return false; } - /*virtual*/ bool isValid() const; + /*virtual*/ bool isValid() const; // use isAgentAvatarValid, it's fuller //-------------------------------------------------------------------- // Updates