diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index e9c19ba54e..bf5f9da01c 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1182,8 +1182,10 @@ bool LLGLManager::initGL() // This is called here because it depends on the setting of mIsGF2or4MX, and sets up mHasMultitexture. initExtensions(); - S32 old_vram = mVRAM; - mVRAM = 0; + // stop doing this and trust the hardware detection + // if hardware detection has all failed the this will correct for that + // S32 old_vram = mVRAM; + // mVRAM = 0; #if LL_WINDOWS if (mHasAMDAssociations) @@ -1216,22 +1218,26 @@ bool LLGLManager::initGL() } #endif -#if LL_WINDOWS - if (mVRAM < 256) - { - // Something likely went wrong using the above extensions - // try WMI first and fall back to old method (from dxdiag) if all else fails - // Function will check all GPUs WMI knows of and will pick up the one with most - // memory. We need to check all GPUs because system can switch active GPU to - // weaker one, to preserve power when not under load. - S32 mem = LLDXHardware::getMBVideoMemoryViaWMI(); - if (mem != 0) - { - mVRAM = mem; - LL_WARNS("RenderInit") << "VRAM Detected (WMI):" << mVRAM<< LL_ENDL; - } - } -#endif +// remove this so that we can attempt to use driver specifics +// if it fails we will pick up the `old_vram` value , which is either WMI or the combined dxdiag number +// both of which are rather useless, but it does at least respect the disable_wmi setting. +// #if LL_WINDOWS +// if (mVRAM < 256) +// { +// // Something likely went wrong using the above extensions +// // try WMI first and fall back to old method (from dxdiag) if all else fails +// // Function will check all GPUs WMI knows of and will pick up the one with most +// // memory. We need to check all GPUs because system can switch active GPU to +// // weaker one, to preserve power when not under load. +// S32 mem = LLDXHardware::getMBVideoMemoryViaWMI(); +// if (mem != 0) +// { +// mVRAM = mem; +// LL_WARNS("RenderInit") << "VRAM Detected (WMI):" << mVRAM<< LL_ENDL; +// } +// } +// #endif +// // Ultimate fallbacks for linux and mesa if (mHasNVXMemInfo && mVRAM == 0) @@ -1250,18 +1256,18 @@ bool LLGLManager::initGL() mVRAM = meminfo[0] / 1024; LL_INFOS("RenderInit") << "VRAM Detected (ATIMemInfo):" << mVRAM << LL_ENDL; } + // stop doing this and trust the hardware detection + // if (mVRAM < 256 && old_vram > 0) + // { + // // fall back to old method + // // Note: on Windows value will be from LLDXHardware. + // // Either received via dxdiag or via WMI by id from dxdiag. + // mVRAM = old_vram; - if (mVRAM < 256 && old_vram > 0) - { - // fall back to old method - // Note: on Windows value will be from LLDXHardware. - // Either received via dxdiag or via WMI by id from dxdiag. - mVRAM = old_vram; - - // VRAM detection logging - LL_WARNS("RenderInit") << "VRAM detected via MemInfo OpenGL extension most likely broken. Reverting to " << mVRAM << " MB" << LL_ENDL; - } - + // // VRAM detection logging + // LL_WARNS("RenderInit") << "VRAM detected via MemInfo OpenGL extension most likely broken. Reverting to " << mVRAM << " MB" << LL_ENDL; + // } + // glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &mNumTextureImageUnits); glGetIntegerv(GL_MAX_COLOR_TEXTURE_SAMPLES, &mMaxColorTextureSamples); glGetIntegerv(GL_MAX_DEPTH_TEXTURE_SAMPLES, &mMaxDepthTextureSamples); diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp index 94d012615a..63d92054f8 100644 --- a/indra/llwindow/lldxhardware.cpp +++ b/indra/llwindow/lldxhardware.cpp @@ -40,6 +40,7 @@ #include #include "lldxhardware.h" +#include #include "llerror.h" @@ -61,6 +62,42 @@ typedef BOOL ( WINAPI* PfnCoSetProxyBlanket )( IUnknown* pProxy, DWORD dwAuthnSv OLECHAR* pServerPrincName, DWORD dwAuthnLevel, DWORD dwImpLevel, RPC_AUTH_IDENTITY_HANDLE pAuthInfo, DWORD dwCapabilities ); +// Deprecate WMI support +uint64_t GetVideoMemoryViaDXGI() +{ + HRESULT hr; + IDXGIFactory* pFactory = nullptr; + IDXGIAdapter* pAdapter = nullptr; + + // Create a DXGI Factory + hr = CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&pFactory); + if (FAILED(hr)) { + std::cerr << "Failed to create DXGI factory." << std::endl; + return 0; + } + + // Enumerate adapters + UINT i = 0; + uint64_t vram_bytes = 0; + while (pFactory->EnumAdapters(i, &pAdapter) != DXGI_ERROR_NOT_FOUND) + { + if(pAdapter) + { + DXGI_ADAPTER_DESC desc; + pAdapter->GetDesc(&desc); + + vram_bytes = desc.DedicatedVideoMemory; + break; + } + SAFE_RELEASE(pAdapter); + ++i; + } + SAFE_RELEASE(pAdapter) + SAFE_RELEASE(pFactory) + return vram_bytes; +} +// + HRESULT GetVideoMemoryViaWMI(WCHAR* strInputDeviceID, DWORD* pdwAdapterRam) { HRESULT hr; @@ -803,6 +840,10 @@ BOOL LLDXHardware::getInfo(BOOL vram_only, bool disable_wmi) LL_INFOS("AppInit") << "VRAM Detected via WMI: " << mVRAM << LL_ENDL; } } + // Deprecate WMI use DXGI in preference. + mVRAM = GetVideoMemoryViaDXGI()/1024/1024; + LL_INFOS("AppInit") << "VRAM Detected via DXGI: " << mVRAM << "MB" << LL_ENDL; + // if (mVRAM == 0) { // Get the English VRAM string diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index dfb59a6684..2f2d2cca88 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -4914,8 +4914,12 @@ void LLWindowWin32::LLWindowWin32Thread::updateVRAMUsage() info.CurrentUsage = 0; #endif - U32 budget_mb = info.Budget / 1024 / 1024; - gGLManager.mVRAM = llmax(gGLManager.mVRAM, (S32) budget_mb); + // Let's not override the detected values here. + // U32 budget_mb = info.Budget / 1024 / 1024; + // instead we clamp budget to detected values + // gGLManager.mVRAM = llmax(gGLManager.mVRAM, (S32) budget_mb); + U32 budget_mb = gGLManager.mVRAM; + // U32 afr_mb = info.AvailableForReservation / 1024 / 1024; // correct for systems that misreport budget @@ -4941,21 +4945,24 @@ void LLWindowWin32::LLWindowWin32Thread::updateVRAMUsage() } U32 target_mb = budget_mb; - if (target_mb > 4096) // if 4GB are installed, try to leave 2GB free - { - target_mb -= 2048; - } - else // if less than 4GB are installed, try not to use more than half of it - { - target_mb /= 2; - } - - mAvailableVRAM = cu_mb < target_mb ? target_mb - cu_mb : 0; + // Let's not override the detected values here. + // Stop playing nice and just let the OS and drivers deal with it. + // if (target_mb > 4096) // if 4GB are installed, try to leave 2GB free + // { + // target_mb -= 2048; + // } + // else // if less than 4GB are installed, try not to use more than half of it + // { + // target_mb /= 2; + // } + // mAvailableVRAM = cu_mb < target_mb ? target_mb - cu_mb : 0; + mAvailableVRAM = eu_mb < target_mb ? target_mb - cu_mb : 0; + // #if 1 F32 eu_error = (F32)((S32)eu_mb - (S32)cu_mb) / (F32)cu_mb; - LL_INFOS("Window") << "\nLocal\nAFR: " << info.AvailableForReservation / 1024 / 1024 + LL_DEBUGS("Window") << "\nLocal\nAFR: " << info.AvailableForReservation / 1024 / 1024 << "\nBudget: " << info.Budget / 1024 / 1024 << "\nCR: " << info.CurrentReservation / 1024 / 1024 << "\nCU: " << info.CurrentUsage / 1024 / 1024 diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 55d0affbb1..31aed2fcb1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -23062,12 +23062,23 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 + FSOverrideVRAMDetection + + Comment + Allow user to override the vRAM detection, use the FSForcedVideoMemory setting instead- use with extreme caution. + Persist + 1 + Type + Boolean + Value + 0 + FSForcedVideoMemory Comment Overrides the video memory detection on Windows if a value greater 0 is passed (in case DirectX memory detection fails or is wrong) Persist - 0 + 1 HideFromEditor 1 Type diff --git a/indra/newview/fspanelface.cpp b/indra/newview/fspanelface.cpp index d5b0d9943b..62c57aa635 100644 --- a/indra/newview/fspanelface.cpp +++ b/indra/newview/fspanelface.cpp @@ -1149,7 +1149,6 @@ struct FSPanelFaceSetTEFunctor : public LLSelectedTEFunctor bool align_planar = mPanel->mCheckPlanarAlign->get(); - llassert(comboTexGen); llassert(object); if (ctrlTexScaleS) diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 0487ddc108..6fb38fd5ca 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -957,122 +957,68 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht if (callback && !callback.empty()) { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - uuid_list_t ids; + bool needs_callback = true; + LLUUID id(LLUUID::null); + switch (type) { - case COPYLIBRARYCATEGORY: - case FETCHCATEGORYCATEGORIES: - case FETCHCATEGORYCHILDREN: - case FETCHCATEGORYSUBSET: - case FETCHCATEGORYLINKS: - case FETCHCOF: - if (result.has("category_id")) + case COPYLIBRARYCATEGORY: + case FETCHCATEGORYCATEGORIES: + case FETCHCATEGORYCHILDREN: + case FETCHCATEGORYSUBSET: + case FETCHCATEGORYLINKS: + case FETCHCOF: + if (result.has("category_id")) + { + id = result["category_id"]; + } + break; + case FETCHITEM: + if (result.has("item_id")) + { + // Error message might contain an item_id!!! + id = result["item_id"]; + } + if (result.has("linked_id")) + { + id = result["linked_id"]; + } + break; + case CREATEINVENTORY: + // CREATEINVENTORY can have multiple callbacks + if (result.has("_created_categories")) + { + LLSD& cats = result["_created_categories"]; + LLSD::array_const_iterator cat_iter; + for (cat_iter = cats.beginArray(); cat_iter != cats.endArray(); ++cat_iter) { - ids.emplace(result["category_id"]); + LLUUID cat_id = *cat_iter; + callback(cat_id); + needs_callback = false; } - break; - case FETCHITEM: - if (result.has("linked_id")) + } + if (result.has("_created_items")) + { + LLSD& items = result["_created_items"]; + LLSD::array_const_iterator item_iter; + for (item_iter = items.beginArray(); item_iter != items.endArray(); ++item_iter) { - ids.emplace(result["linked_id"]); + LLUUID item_id = *item_iter; + callback(item_id); + needs_callback = false; } - else if (result.has("item_id")) - { - // Error message might contain an item_id!!! - ids.emplace(result["item_id"]); - } - break; - case COPYINVENTORY: - case CREATEINVENTORY: - { - AISUpdate::parseUUIDArray(result, "_created_categories", ids); - AISUpdate::parseUUIDArray(result, "_created_items", ids); - } - break; - case UPDATECATEGORY: - { - AISUpdate::parseUUIDArray(result, "_updated_categories", ids); - } - break; - default: - break; + } + break; + default: + break; } - // Call callback at least once regardless of failure. - if (ids.empty()) - { - ids.emplace(LLUUID::null); - } - - for (const auto& id : ids) + if (needs_callback) { + // Call callback at least once regardless of failure. + // UPDATEITEM doesn't expect an id callback(id); } - -// [/SL:KB] - //bool needs_callback = true; - //LLUUID id(LLUUID::null); - - //switch (type) - //{ - //case COPYLIBRARYCATEGORY: - //case FETCHCATEGORYCATEGORIES: - //case FETCHCATEGORYCHILDREN: - //case FETCHCATEGORYSUBSET: - //case FETCHCATEGORYLINKS: - //case FETCHCOF: - // if (result.has("category_id")) - // { - // id = result["category_id"]; - // } - // break; - //case FETCHITEM: - // if (result.has("item_id")) - // { - // // Error message might contain an item_id!!! - // id = result["item_id"]; - // } - // if (result.has("linked_id")) - // { - // id = result["linked_id"]; - // } - // break; - //case CREATEINVENTORY: - // // CREATEINVENTORY can have multiple callbacks - // if (result.has("_created_categories")) - // { - // LLSD& cats = result["_created_categories"]; - // LLSD::array_const_iterator cat_iter; - // for (cat_iter = cats.beginArray(); cat_iter != cats.endArray(); ++cat_iter) - // { - // LLUUID cat_id = *cat_iter; - // callback(cat_id); - // needs_callback = false; - // } - // } - // if (result.has("_created_items")) - // { - // LLSD& items = result["_created_items"]; - // LLSD::array_const_iterator item_iter; - // for (item_iter = items.beginArray(); item_iter != items.endArray(); ++item_iter) - // { - // LLUUID item_id = *item_iter; - // callback(item_id); - // needs_callback = false; - // } - // } - // break; - //default: - // break; - //} - - //if (needs_callback) - //{ - // // Call callback at least once regardless of failure. - // // UPDATEITEM doesn't expect an id - // callback(id); - //} } } diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h index f1a5d7442c..0dabd9f678 100644 --- a/indra/newview/llaisapi.h +++ b/indra/newview/llaisapi.h @@ -114,10 +114,7 @@ public: void parseUpdate(const LLSD& update); void parseMeta(const LLSD& update); void parseContent(const LLSD& update); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - static void parseUUIDArray(const LLSD& content, const std::string& name, uuid_list_t& ids); -// [/SL:KB] -// void parseUUIDArray(const LLSD& content, const std::string& name, uuid_list_t& ids); + void parseUUIDArray(const LLSD& content, const std::string& name, uuid_list_t& ids); void parseLink(const LLSD& link_map, S32 depth); void parseItem(const LLSD& link_map); void parseCategory(const LLSD& link_map, S32 depth); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 24a8166fea..69eea2adad 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -714,20 +714,16 @@ public: bool pollMissingWearables(); bool isMissingCompleted(); void recoverMissingWearable(LLWearableType::EType type); -// void clearCOFLinksForMissingWearables(); + void clearCOFLinksForMissingWearables(); void onWearableAssetFetch(LLViewerWearable *wearable); void onAllComplete(); -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) - bool pollStopped(); -// [/SL:KB] - typedef std::list found_list_t; found_list_t& getFoundList(); void eraseTypeToLink(LLWearableType::EType type); void eraseTypeToRecover(LLWearableType::EType type); -// void setObjItems(const LLInventoryModel::item_array_t& items); + void setObjItems(const LLInventoryModel::item_array_t& items); void setGestItems(const LLInventoryModel::item_array_t& items); bool isMostRecent(); void handleLateArrivals(); @@ -737,7 +733,7 @@ public: private: found_list_t mFoundList; -// LLInventoryModel::item_array_t mObjItems; + LLInventoryModel::item_array_t mObjItems; LLInventoryModel::item_array_t mGestItems; typedef std::set type_set_t; type_set_t mTypesToRecover; @@ -814,11 +810,10 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type) mTypesToRecover.erase(type); } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.1 -//void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) -//{ -// mObjItems = items; -//} +void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) +{ + mObjItems = items; +} void LLWearableHoldingPattern::setGestItems(const LLInventoryModel::item_array_t& items) { @@ -925,56 +920,55 @@ void LLWearableHoldingPattern::onAllComplete() if (isAgentAvatarValid()) { -// LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL; -// LLAgentWearables::llvo_vec_t objects_to_remove; -// LLAgentWearables::llvo_vec_t objects_to_retain; -// LLInventoryModel::item_array_t items_to_add; -// -// LLAgentWearables::findAttachmentsAddRemoveInfo(mObjItems, -// objects_to_remove, -// objects_to_retain, -// items_to_add); -// -// LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size() -// << " attachments" << LL_ENDL; -// -// // Here we remove the attachment pos overrides for *all* -// // attachments, even those that are not being removed. This is -// // needed to get joint positions all slammed down to their -// // pre-attachment states. -// gAgentAvatarp->clearAttachmentOverrides(); -// -// if (objects_to_remove.size() || items_to_add.size()) -// { -// LL_DEBUGS("Avatar") << "ATT will remove " << objects_to_remove.size() -// << " and add " << items_to_add.size() << " items" << LL_ENDL; -// } -// -// // Take off the attachments that will no longer be in the outfit. -// LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove); + LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL; + LLAgentWearables::llvo_vec_t objects_to_remove; + LLAgentWearables::llvo_vec_t objects_to_retain; + LLInventoryModel::item_array_t items_to_add; + + LLAgentWearables::findAttachmentsAddRemoveInfo(mObjItems, + objects_to_remove, + objects_to_retain, + items_to_add); + + LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size() + << " attachments" << LL_ENDL; + + // Here we remove the attachment pos overrides for *all* + // attachments, even those that are not being removed. This is + // needed to get joint positions all slammed down to their + // pre-attachment states. + gAgentAvatarp->clearAttachmentOverrides(); + + if (objects_to_remove.size() || items_to_add.size()) + { + LL_DEBUGS("Avatar") << "ATT will remove " << objects_to_remove.size() + << " and add " << items_to_add.size() << " items" << LL_ENDL; + } + + // Take off the attachments that will no longer be in the outfit. + LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove); // Update wearables. LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " updating agent wearables with " << mResolved << " wearable items " << LL_ENDL; LLAppearanceMgr::instance().updateAgentWearables(this); -// Merge; Changed in FS but not tagged with any FS: comment explaining by whom and the purpose -// // Restore attachment pos overrides for the attachments that -// // are remaining in the outfit. -// for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin(); -// it != objects_to_retain.end(); -// ++it) -// { -// LLViewerObject *objectp = *it; -// if (!objectp->isAnimatedObject()) -// { -// gAgentAvatarp->addAttachmentOverridesForObject(objectp); -// } -// } -// -// // Add new attachments to match those requested. -// LL_DEBUGS("Avatar") << self_av_string() << "Adding " << items_to_add.size() << " attachments" << LL_ENDL; -// LLAgentWearables::userAttachMultipleAttachments(items_to_add); + // Restore attachment pos overrides for the attachments that + // are remaining in the outfit. + for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin(); + it != objects_to_retain.end(); + ++it) + { + LLViewerObject *objectp = *it; + if (!objectp->isAnimatedObject()) + { + gAgentAvatarp->addAttachmentOverridesForObject(objectp); + } + } + + // Add new attachments to match those requested. + LL_DEBUGS("Avatar") << self_av_string() << "Adding " << items_to_add.size() << " attachments" << LL_ENDL; + LLAgentWearables::userAttachMultipleAttachments(items_to_add); } if (isFetchCompleted() && isMissingCompleted()) @@ -1012,12 +1006,6 @@ bool LLWearableHoldingPattern::pollFetchCompletion() { // runway skip here? LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; - -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) - // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves - doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); - return true; -// [/SL:KB] } bool completed = isFetchCompleted(); @@ -1088,11 +1076,6 @@ void recovered_item_cb(const LLUUID& item_id, LLWearableType::EType type, LLView { // runway skip here? LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; - -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) - // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves - return; -// [/SL:KB] } LL_DEBUGS("Avatar") << self_av_string() << "Recovered item for type " << type << LL_ENDL; @@ -1143,32 +1126,19 @@ bool LLWearableHoldingPattern::isMissingCompleted() return mTypesToLink.size()==0 && mTypesToRecover.size()==0; } -//void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() -//{ -// for (found_list_t::iterator it = getFoundList().begin(); it != getFoundList().end(); ++it) -// { -// LLFoundData &data = *it; -// if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable)) -// { -// // Wearable link that was never resolved; remove links to it from COF -// LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " removing link for unresolved item " << data.mItemID.asString() << LL_ENDL; -// LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID); -// } -// } -//} - -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) -bool LLWearableHoldingPattern::pollStopped() +void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() { - // We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash - if ( (isFetchCompleted()) && (isMissingCompleted()) ) + for (found_list_t::iterator it = getFoundList().begin(); it != getFoundList().end(); ++it) { - delete this; - return true; + LLFoundData &data = *it; + if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable)) + { + // Wearable link that was never resolved; remove links to it from COF + LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " removing link for unresolved item " << data.mItemID.asString() << LL_ENDL; + LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID); + } } - return false; } -// [/SL:KB] bool LLWearableHoldingPattern::pollMissingWearables() { @@ -1176,12 +1146,6 @@ bool LLWearableHoldingPattern::pollMissingWearables() { // runway skip here? LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; - -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) - // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves - doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); - return true; -// [/SL:KB] } bool timed_out = isTimedOut(); @@ -2894,72 +2858,6 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions, << " descendent_count " << cof->getDescendentCount() << " viewer desc count " << cof->getViewerDescendentCount() << LL_ENDL; } - -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.2 - // Update attachments to match those requested. - if (isAgentAvatarValid()) - { - // Include attachments which should be in COF but don't have their link created yet - std::set pendingAttachments; - if (LLAttachmentsMgr::instance().getPendingAttachments(pendingAttachments)) - { - for (const LLUUID& idAttachItem : pendingAttachments) - { - if ( (!gAgentAvatarp->isWearingAttachment(idAttachItem)) || (isLinkedInCOF(idAttachItem)) ) - { - LLAttachmentsMgr::instance().clearPendingAttachmentLink(idAttachItem); - continue; - } - - LLViewerInventoryItem* pAttachItem = gInventory.getItem(idAttachItem); - if (pAttachItem) - { - obj_items.push_back(pAttachItem); - } - } - } - - // (Start of LL code from LLWearableHoldingPattern::onAllComplete()) - LL_DEBUGS("Avatar") << self_av_string() << "Updating " << obj_items.size() << " attachments" << LL_ENDL; - - LLAgentWearables::llvo_vec_t objects_to_remove; - LLAgentWearables::llvo_vec_t objects_to_retain; - LLInventoryModel::item_array_t items_to_add; - LLAgentWearables::findAttachmentsAddRemoveInfo(obj_items, objects_to_remove, objects_to_retain, items_to_add); - - // Here we remove the attachment pos overrides for *all* - // attachments, even those that are not being removed. This is - // needed to get joint positions all slammed down to their - // pre-attachment states. - gAgentAvatarp->clearAttachmentOverrides(); - // (End of LL code) - - // Take off the attachments that will no longer be in the outfit. - // (but don't remove attachments until avatar is fully loaded - should reduce random attaching/detaching/reattaching at log-on) - if (gAgentAvatarp->isFullyLoaded()) - { - LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size() << " attachments" << LL_ENDL; - LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove); - } - - // (Start of LL code from LLWearableHoldingPattern::onAllComplete()) - // Restore attachment pos overrides for the attachments that are remaining in the outfit. - for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin(); it != objects_to_retain.end(); ++it) - { - LLViewerObject *objectp = *it; - if (!objectp->isAnimatedObject()) - { - gAgentAvatarp->addAttachmentOverridesForObject(objectp); - } - } - - // Add new attachments to match those requested. - LL_DEBUGS("Avatar") << self_av_string() << "Adding " << items_to_add.size() << " attachments" << LL_ENDL; - LLAgentWearables::userAttachMultipleAttachments(items_to_add); - // (End of LL code) - } -// [/SL:KB] - if(!wear_items.size()) { LLNotificationsUtil::add("CouldNotPutOnOutfit"); @@ -2974,7 +2872,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions, LLTimer hp_block_timer; LLWearableHoldingPattern* holder = new LLWearableHoldingPattern; -// holder->setObjItems(obj_items); + holder->setObjItems(obj_items); holder->setGestItems(gest_items); // Note: can't do normal iteration, because if all the @@ -4705,9 +4603,6 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, nul if (!cb) cb = new LLUpdateAppearanceOnDestroy(true, true, post_update_func); removeCOFItemLinks(linked_item_id, cb, immediate_delete); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - LLAttachmentsMgr::instance().clearPendingAttachmentLink(linked_item_id); -// [/SL:KB] addDoomedTempAttachment(linked_item_id); } // [/RLVa:KB] diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 0ddbcafa0c..7cae2b0275 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -155,9 +155,6 @@ public: // Attachment link management void unregisterAttachment(const LLUUID& item_id); void registerAttachment(const LLUUID& item_id); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - bool getAttachmentInvLinkEnable() { return mAttachmentInvLinkEnabled; } -// [/SL:KB] void setAttachmentInvLinkEnable(bool val); // Add COF link to individual item. diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index c99fc68b8e..8430a17973 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -1027,15 +1027,18 @@ bool LLAppViewerWin32::initHardwareTest() if (gGLManager.mVRAM == 0) { - // FIRE-12671: Force VRAM if DirectX detection is broken - S32 forced_video_memory; - if ((forced_video_memory = gSavedSettings.getS32("FSForcedVideoMemory")) > 0) + // Allow the user to override the VRAM detection + if ( gSavedSettings.getBOOL("FSOverrideVRAMDetection") ) { - LL_INFOS("AppInit") << "Forcing VRAM to " << forced_video_memory << " MB" << LL_ENDL; - gGLManager.mVRAM = forced_video_memory; + S32 forced_video_memory = gSavedSettings.getS32("FSForcedVideoMemory"); + if ( forced_video_memory > 0 ) + { + LL_INFOS("AppInit") << "Forcing VRAM to " << forced_video_memory*1024 << " MB" << LL_ENDL; + gGLManager.mVRAM = forced_video_memory*1024; + } } else - // + // gGLManager.mVRAM = gDXHardware.getVRAM(); } diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index 88373166d8..364810bd5d 100644 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -46,31 +46,10 @@ const F32 MAX_ATTACHMENT_REQUEST_LIFETIME = 30.0F; const F32 MIN_RETRY_REQUEST_TIME = 5.0F; const F32 MAX_BAD_COF_TIME = 30.0F; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 -class LLRegisterAttachmentCallback : public LLRequestServerAppearanceUpdateOnDestroy -{ -public: - LLRegisterAttachmentCallback() - : LLRequestServerAppearanceUpdateOnDestroy() - { - } - - ~LLRegisterAttachmentCallback() override - { - } - - void fire(const LLUUID& idItem) override - { - LLAttachmentsMgr::instance().onRegisterAttachmentComplete(idItem); - LLRequestServerAppearanceUpdateOnDestroy::fire(idItem); - } -}; -// [/SL:KB] - LLAttachmentsMgr::LLAttachmentsMgr(): mAttachmentRequests("attach",MIN_RETRY_REQUEST_TIME), - mDetachRequests("detach",MIN_RETRY_REQUEST_TIME) -// , mQuestionableCOFLinks("badcof",MAX_BAD_COF_TIME) + mDetachRequests("detach",MIN_RETRY_REQUEST_TIME), + mQuestionableCOFLinks("badcof",MAX_BAD_COF_TIME) { } @@ -130,11 +109,6 @@ void LLAttachmentsMgr::addAttachmentRequest(const LLUUID& item_id, void LLAttachmentsMgr::onAttachmentRequested(const LLUUID& item_id) { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - if (item_id.isNull()) - return; -// [/SL:KB] - LLViewerInventoryItem *item = gInventory.getItem(item_id); LL_DEBUGS("Avatar") << "ATT attachment was requested " << (item ? item->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL; @@ -168,7 +142,7 @@ void LLAttachmentsMgr::onIdle() expireOldDetachRequests(); - //checkInvalidCOFLinks(); + checkInvalidCOFLinks(); spamStatusInfo(); } @@ -280,13 +254,6 @@ void LLAttachmentsMgr::linkRecentlyArrivedAttachments() { if (mRecentlyArrivedAttachments.size()) { - // [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - if (!LLAppearanceMgr::instance().getAttachmentInvLinkEnable()) - { - return; - } -// [/SL:KB] - // One or more attachments have arrived but have not yet been // processed for COF links if (mAttachmentRequests.empty()) @@ -333,68 +300,17 @@ void LLAttachmentsMgr::linkRecentlyArrivedAttachments() } if (ids_to_link.size()) { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - LLPointer cb = NULL; - for (uuid_vec_t::const_iterator itAttach = ids_to_link.begin(); itAttach != ids_to_link.end(); ++itAttach) + LLPointer cb = new LLRequestServerAppearanceUpdateOnDestroy(); + for (uuid_vec_t::const_iterator uuid_it = ids_to_link.begin(); + uuid_it != ids_to_link.end(); ++uuid_it) { - const LLUUID& idAttach = *itAttach; - if (std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), idAttach) == mPendingAttachLinks.end()) - { - if (cb.isNull()) - { - cb = new LLRegisterAttachmentCallback(); - } - LLAppearanceMgr::instance().addCOFItemLink(idAttach, cb); - mPendingAttachLinks.insert(idAttach); - } + LLAppearanceMgr::instance().addCOFItemLink(*uuid_it, cb); } -// [/SL:KB] -// LLPointer cb = new LLRequestServerAppearanceUpdateOnDestroy(); -// for (uuid_vec_t::const_iterator uuid_it = ids_to_link.begin(); -// uuid_it != ids_to_link.end(); ++uuid_it) -// { -// LLAppearanceMgr::instance().addCOFItemLink(*uuid_it, cb); -// } } mRecentlyArrivedAttachments.clear(); } } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.2 -bool LLAttachmentsMgr::getPendingAttachments(std::set& ids) const -{ - ids.clear(); - - // Returns the union of the LL maintained list of attachments that are waiting for link creation and our maintained list of attachments that are pending link creation - set_union(mRecentlyArrivedAttachments.begin(), mRecentlyArrivedAttachments.end(), mPendingAttachLinks.begin(), mPendingAttachLinks.end(), std::inserter(ids, ids.begin())); - - return !ids.empty(); -} - -void LLAttachmentsMgr::clearPendingAttachmentLink(const LLUUID& idItem) -{ - mPendingAttachLinks.erase(idItem); -} - -void LLAttachmentsMgr::onRegisterAttachmentComplete(const LLUUID& idAttachLink) -{ - const LLViewerInventoryItem* pAttachLink = gInventory.getItem(idAttachLink); - if (!pAttachLink) - return; - - const LLUUID& idAttachBase = pAttachLink->getLinkedUUID(); - - // Remove the attachment from the pending list - clearPendingAttachmentLink(idAttachBase); - - // It may have been detached already in which case we should remove the COF link - if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isWearingAttachment(idAttachBase)) ) - { - LLAppearanceMgr::instance().removeCOFItemLinks(idAttachBase, NULL, true); - } -} -// [/SL:KB] - LLAttachmentsMgr::LLItemRequestTimes::LLItemRequestTimes(const std::string& op_name, F32 timeout): mOpName(op_name), mTimeout(timeout) @@ -523,11 +439,6 @@ void LLAttachmentsMgr::onDetachRequested(const LLUUID& inv_item_id) void LLAttachmentsMgr::onDetachCompleted(const LLUUID& inv_item_id) { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.2 - // (mRecentlyArrivedAttachments doesn't need pruning since it'll check the attachment is actually worn before linking) - clearPendingAttachmentLink(inv_item_id); -// [/SL:KB] - LLTimer timer; LLInventoryItem *item = gInventory.getItem(inv_item_id); if (mDetachRequests.getTime(inv_item_id, timer)) @@ -550,25 +461,18 @@ void LLAttachmentsMgr::onDetachCompleted(const LLUUID& inv_item_id) LL_DEBUGS("Avatar") << "ATT detach on shutdown for " << (item ? item->getName() : "UNKNOWN") << " " << inv_item_id << LL_ENDL; } -// LL_DEBUGS("Avatar") << "ATT detached item flagging as questionable for COF link checking " -// << (item ? item->getName() : "UNKNOWN") << " id " << inv_item_id << LL_ENDL; -// mQuestionableCOFLinks.addTime(inv_item_id); + LL_DEBUGS("Avatar") << "ATT detached item flagging as questionable for COF link checking " + << (item ? item->getName() : "UNKNOWN") << " id " << inv_item_id << LL_ENDL; + mQuestionableCOFLinks.addTime(inv_item_id); } bool LLAttachmentsMgr::isAttachmentStateComplete() const { -// [SL:KB] - Patch: Appearance-Misc | Checked: Catznip-4.3 return mPendingAttachments.empty() && mAttachmentRequests.empty() && mDetachRequests.empty() && mRecentlyArrivedAttachments.empty() - && mPendingAttachLinks.empty(); -// [/SL:KB] -// return mPendingAttachments.empty() -// && mAttachmentRequests.empty() -// && mDetachRequests.empty() -// && mRecentlyArrivedAttachments.empty() -// && mQuestionableCOFLinks.empty(); + && mQuestionableCOFLinks.empty(); } // Check for attachments that are (a) linked in COF and (b) not @@ -591,58 +495,58 @@ bool LLAttachmentsMgr::isAttachmentStateComplete() const // // See related: MAINT-5070, MAINT-4409 // -//void LLAttachmentsMgr::checkInvalidCOFLinks() -//{ -// if (!gInventory.isInventoryUsable()) -// { -// return; -// } -// LLInventoryModel::cat_array_t cat_array; -// LLInventoryModel::item_array_t item_array; -// gInventory.collectDescendents(LLAppearanceMgr::instance().getCOF(), -// cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH); -// for (S32 i=0; igetLinkedUUID(); -// if (inv_item->getType() == LLAssetType::AT_OBJECT) -// { -// LLTimer timer; -// bool is_flagged_questionable = mQuestionableCOFLinks.getTime(item_id,timer); -// bool is_wearing_attachment = isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item_id); -// if (is_wearing_attachment && is_flagged_questionable) -// { -// LL_DEBUGS("Avatar") << "ATT was flagged questionable but is now " -// << (is_wearing_attachment ? "attached " : "") -// <<"removing flag after " -// << timer.getElapsedTimeF32() << " item " -// << inv_item->getName() << " id " << item_id << LL_ENDL; -// mQuestionableCOFLinks.removeTime(item_id); -// } -// } -// } +void LLAttachmentsMgr::checkInvalidCOFLinks() +{ + if (!gInventory.isInventoryUsable()) + { + return; + } + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + gInventory.collectDescendents(LLAppearanceMgr::instance().getCOF(), + cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH); + for (S32 i=0; igetLinkedUUID(); + if (inv_item->getType() == LLAssetType::AT_OBJECT) + { + LLTimer timer; + bool is_flagged_questionable = mQuestionableCOFLinks.getTime(item_id,timer); + bool is_wearing_attachment = isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item_id); + if (is_wearing_attachment && is_flagged_questionable) + { + LL_DEBUGS("Avatar") << "ATT was flagged questionable but is now " + << (is_wearing_attachment ? "attached " : "") + <<"removing flag after " + << timer.getElapsedTimeF32() << " item " + << inv_item->getName() << " id " << item_id << LL_ENDL; + mQuestionableCOFLinks.removeTime(item_id); + } + } + } -// for(LLItemRequestTimes::iterator it = mQuestionableCOFLinks.begin(); -// it != mQuestionableCOFLinks.end(); ) -// { -// LLItemRequestTimes::iterator curr_it = it; -// ++it; -// const LLUUID& item_id = curr_it->first; -// LLViewerInventoryItem *inv_item = gInventory.getItem(item_id); -// if (curr_it->second.getElapsedTimeF32() > MAX_BAD_COF_TIME) -// { -// if (LLAppearanceMgr::instance().isLinkedInCOF(item_id)) -// { -// LL_DEBUGS("Avatar") << "ATT Linked in COF but not attached or requested, deleting link after " -// << curr_it->second.getElapsedTimeF32() << " seconds for " -// << (inv_item ? inv_item->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL; -// LLAppearanceMgr::instance().removeCOFItemLinks(item_id); -// } -// mQuestionableCOFLinks.erase(curr_it); -// continue; -// } -// } -//} + for(LLItemRequestTimes::iterator it = mQuestionableCOFLinks.begin(); + it != mQuestionableCOFLinks.end(); ) + { + LLItemRequestTimes::iterator curr_it = it; + ++it; + const LLUUID& item_id = curr_it->first; + LLViewerInventoryItem *inv_item = gInventory.getItem(item_id); + if (curr_it->second.getElapsedTimeF32() > MAX_BAD_COF_TIME) + { + if (LLAppearanceMgr::instance().isLinkedInCOF(item_id)) + { + LL_DEBUGS("Avatar") << "ATT Linked in COF but not attached or requested, deleting link after " + << curr_it->second.getElapsedTimeF32() << " seconds for " + << (inv_item ? inv_item->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL; + LLAppearanceMgr::instance().removeCOFItemLinks(item_id); + } + mQuestionableCOFLinks.erase(curr_it); + continue; + } + } +} void LLAttachmentsMgr::spamStatusInfo() { diff --git a/indra/newview/llattachmentsmgr.h b/indra/newview/llattachmentsmgr.h index 349cb2ecc5..28d0bd3fbb 100644 --- a/indra/newview/llattachmentsmgr.h +++ b/indra/newview/llattachmentsmgr.h @@ -92,15 +92,8 @@ public: bool isAttachmentStateComplete() const; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.1 -public: - void clearPendingAttachmentLink(const LLUUID& idItem); - bool getPendingAttachments(std::set& ids) const; + // [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0 void refreshAttachments(); -protected: - void onRegisterAttachmentComplete(const LLUUID& idAttachLink); - friend class LLRegisterAttachmentCallback; -// [/SL:KB] private: @@ -124,7 +117,7 @@ private: void linkRecentlyArrivedAttachments(); void expireOldAttachmentRequests(); void expireOldDetachRequests(); -// void checkInvalidCOFLinks(); + void checkInvalidCOFLinks(); void spamStatusInfo(); // Attachments that we are planning to rez but haven't requested from the server yet. @@ -140,13 +133,8 @@ private: std::set mRecentlyArrivedAttachments; LLTimer mCOFLinkBatchTimer; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.1 - // Attachments that have pending link creation - std::set mPendingAttachLinks; -// [/SL:KB] - -// // Attachments that are linked in the COF but may be invalid. -// LLItemRequestTimes mQuestionableCOFLinks; + // Attachments that are linked in the COF but may be invalid. + LLItemRequestTimes mQuestionableCOFLinks; }; #endif diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index b7022ac69c..ad1a4890c7 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -245,13 +245,8 @@ void LLGLTFMaterialList::applyOverrideMessage(LLMessageSystem* msg, const std::s } } } - // FIRE-33808 - Material Override Cache causes long delays - if(cache.mSides.size() > 0) - { - region->cacheFullUpdateGLTFOverride(cache); - LL_DEBUGS("GLTF") << "GLTF Material Override: " << cache.mObjectId << " " << cache.mLocalId << " " << cache.mRegionHandle << " (sides:" << (cache.mSides.size()) << ")" << LL_ENDL; - } - // + region->cacheFullUpdateGLTFOverride(cache); + LL_DEBUGS("GLTF") << "GLTF Material Override: " << cache.mObjectId << " " << cache.mLocalId << " " << cache.mRegionHandle << " (sides:" << (cache.mSides.size()) << ")" << LL_ENDL; } } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 2e09d6fd3b..52d80780e9 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3102,8 +3102,7 @@ void LLSelectMgr::logNoOp(LLSelectNode* node, void *) // static void LLSelectMgr::logAttachmentRequest(LLSelectNode* node, void *) { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 -// LLAttachmentsMgr::instance().onAttachmentRequested(node->mItemID); + LLAttachmentsMgr::instance().onAttachmentRequested(node->mItemID); } // static diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 492967fda4..216357b410 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -551,7 +551,7 @@ void LLGLTexMemBar::draw() U32 texFetchLatMed = U32(recording.getMean(LLTextureFetch::sTexFetchLatency).value() * 1000.0f); U32 texFetchLatMax = U32(recording.getMax(LLTextureFetch::sTexFetchLatency).value() * 1000.0f); - text = llformat("GL Free: %d MB Sys Free: %d MB GL Tex: %d MB FBO: %d MB Bias: %.2f Cache: %.1f/%.1f MB", + text = llformat("est. VRAM Free: %d MB Sys Free: %d MB GL Tex: %d MB FBO: %d MB Bias: %.2f Cache: %.1f/%.1f MB", gViewerWindow->getWindow()->getAvailableVRAMMegabytes(), LLMemory::getAvailableMemKB()/1024, LLImageGL::getTextureBytesAllocated() / 1024 / 1024, diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 3841366ed0..0f3803887c 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -357,6 +357,16 @@ static bool handleVolumeLODChanged(const LLSD& newvalue) return true; } +// Override VRAM detection support +static bool handleOverrideVRAMDetectionChanged(const LLSD& newvalue) +{ + if (newvalue.asBoolean()) + { + LLNotificationsUtil::add("OverrideVRAMWarning"); + } + return true; +} +// static bool handleAvatarLODChanged(const LLSD& newvalue) { @@ -1177,6 +1187,7 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "RenderGlowHDR", handleReleaseGLBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderGlowNoise", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderGammaFull", handleSetShaderChanged); + setting_setup_signal_listener(gSavedSettings, "FSOverrideVRAMDetection", handleOverrideVRAMDetectionChanged); // Override VRAM detection support setting_setup_signal_listener(gSavedSettings, "RenderVolumeLODFactor", handleVolumeLODChanged); setting_setup_signal_listener(gSavedSettings, "RenderAvatarLODFactor", handleAvatarLODChanged); setting_setup_signal_listener(gSavedSettings, "RenderAvatarPhysicsLODFactor", handleAvatarPhysicsLODChanged); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 00a3c94f93..920ec2f8fd 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2889,8 +2889,15 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec void LLViewerRegion::cacheFullUpdateGLTFOverride(const LLGLTFOverrideCacheEntry &override_data) { U32 local_id = override_data.mLocalId; + if (override_data.mSides.size() > 0) + { // empty override means overrides were removed from this object mImpl->mGLTFOverridesLLSD[local_id] = override_data; } + else + { + mImpl->mGLTFOverridesLLSD.erase(local_id); + } +} LLVOCacheEntry* LLViewerRegion::getCacheEntryForOctree(U32 local_id) { @@ -3122,6 +3129,11 @@ void LLViewerRegion::dumpCache() // TODO - add overrides cache too } +void LLViewerRegion::clearVOCacheFromMemory() +{ + mImpl->mCacheMap.clear(); +} + void LLViewerRegion::unpackRegionHandshake() { LLMessageSystem *msg = gMessageSystem; diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index da9738a5b7..928a6909d8 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -404,7 +404,7 @@ public: void findOrphans(U32 parent_id); void clearCachedVisibleObjects(); void dumpCache(); - + void clearVOCacheFromMemory(); void unpackRegionHandshake(); void calculateCenterGlobal(); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 7da6bb8339..2c8017655d 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2091,32 +2091,6 @@ LLViewerWindow::LLViewerWindow(const Params& p) gSavedSettings.setU32("RenderQualityPerformance", 0); } - // Texture memory management - // On 64bit builds, allow up to 1GB texture memory on cards with 2GB video - // memory and up to 2GB texture memory on cards with 4GB video memory. Check - // is performed against a lower limit as not exactly 2 or 4GB might not be - // returned. -#if ADDRESS_SIZE == 64 - LL_INFOS() << "GLManager detected " << gGLManager.mVRAM << " MB VRAM" << LL_ENDL; - - if (gGLManager.mVRAM > 3584) - { - gMaxVideoRam = S32Megabytes(2048); - LL_INFOS() << "At least 4 GB video memory detected - increasing max video ram for textures to 2048 MB" << LL_ENDL; - } - else if (gGLManager.mVRAM > 1536) - { - gMaxVideoRam = S32Megabytes(1024); - LL_INFOS() << "At least 2 GB video memory detected - increasing max video ram for textures to 1024 MB" << LL_ENDL; - } - else if (gGLManager.mVRAM > 768) - { - gMaxVideoRam = S32Megabytes(768); - LL_INFOS() << "At least 1 GB video memory detected - increasing max video ram for textures to 768 MB" << LL_ENDL; - } -#endif - // - // Max texture resolution #if ADDRESS_SIZE == 64 if (gSavedSettings.getBOOL("FSRestrictMaxTextureSize")) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 17d744b5a0..d6d527e727 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -9286,11 +9286,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) BOOL LLVOAvatar::isFullyLoaded() const { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.2 - // Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp - return (mRenderUnloadedAvatar && !isSelf()) ||(mFullyLoaded); -// [/SL:KB] -// return (mRenderUnloadedAvatar || mFullyLoaded); + return (mRenderUnloadedAvatar || mFullyLoaded); } bool LLVOAvatar::isTooComplex() const diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index d38131a1fd..994b2870ef 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -1302,6 +1302,13 @@ void LLVOCache::removeEntry(HeaderEntryInfo* entry) LL_INFOS() << "Removing entry for region with filename" << filename << LL_ENDL; // + // make sure corresponding LLViewerRegion also clears its in-memory cache + LLViewerRegion* regionp = LLWorld::instance().getRegionFromHandle(entry->mHandle); + if (regionp) + { + regionp->clearVOCacheFromMemory(); + } + header_entry_queue_t::iterator iter = mHeaderEntryQueue.find(entry); if(iter != mHeaderEntryQueue.end()) { @@ -1370,11 +1377,14 @@ void LLVOCache::removeFromCache(HeaderEntryInfo* entry) std::string filename; getObjectCacheFilename(entry->mHandle, filename); + LL_WARNS("GLTF", "VOCache") << "Removing object cache for handle " << entry->mHandle << "Filename: " << filename << LL_ENDL; LLAPRFile::remove(filename, mLocalAPRFilePoolp); // FIRE-33808 - Material Override Cache causes long delays // Note that removeFromCache should take responsibility for cleaning up all cache artefactgs specfic to the handle/entry. // as such this now includes the generic extras - removeGenericExtrasForHandle(entry->mHandle); + filename = getObjectCacheExtrasFilename(entry->mHandle); + LL_WARNS("GLTF", "VOCache") << "Removing generic extras for handle " << entry->mHandle << "Filename: " << filename << LL_ENDL; + LLFile::remove(filename); // entry->mTime = INVALID_TIME ; updateEntry(entry) ; //update the head file. @@ -1647,6 +1657,13 @@ void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCac versionNumber = std::stol(versionStr); std::getline(in, line); // read the next line for the region UUID check } + // For future versions we may call a legacy handler here, but realistically we'll just consider this cache out of date. + // The important thing is to make sure it gets removed. + if(versionNumber != LLGLTFOverrideCacheEntry::VERSION && versionNumber != 0) + { + LL_WARNS() << "Unexpected version number " << versionNumber << " for extras cache for handle " << handle << LL_ENDL; + in.close(); + } // if(!LLUUID::validate(line)) { @@ -1907,7 +1924,19 @@ void LLVOCache::removeGenericExtrasForHandle(U64 handle) return ; } LL_WARNS("GLTF", "VOCache") << "Removing generic extras for handle " << handle << "Filename: " << getObjectCacheExtrasFilename(handle) << LL_ENDL; - LLFile::remove(getObjectCacheExtrasFilename(handle)); + + // NOTE: when removing the extras, we must also remove the objects so the simulator will send us a full upddate with the valid overrides + auto* entry = mHandleEntryMap[handle]; + if (entry) + { + removeEntry(entry); + } + else + { + //shouldn't happen, but if it does, we should remove the extras file since it's orphaned + LL_WARNS("GLTF", "VOCache") << "Removing generic extras for handle " << entry->mHandle << "Filename: " << getObjectCacheExtrasFilename(handle) << LL_ENDL; + LLFile::remove(getObjectCacheExtrasFilename(entry->mHandle)); + } } // diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 7f3cbc513b..af99671a52 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -5705,6 +5705,14 @@ LOD-Faktor >4: Nur in Ausnahmefällen verwenden. Wird beim Neustart zurückgeset LOD-Faktor >8: Hat keinen echten Effekt. Kann Fehler verursachen. + + WARNUNG: Das Übersteuern der VRAM-Erkennung kann Instabilitäten verursachen. + +Die meisten Benutzer sollten diese Einstellung deaktiviert und dem Viewer sowie Betriebssystem den korrekten Wert ermitteln lassen. + +Diese Einstellung ist für den Fall gedacht, wenn die VRAM-Erkennung inkorrekte Ergebnisse liefert. Bitte mit Vorsicht verwenden und im Zweifel Hilfe beim Support erfragen. + + Diese Region hat sich dazu entschieden, das Währungsportal eines Drittanbieters zu nutzen. Bitte beachten Sie, dass es sich bei Käufen von Währung innerhalb des Firestorm Viewers um Transaktionen zwischen Ihnen (dem Nutzer) und den Anbietern oder Verkäufern der Währung handelt. diff --git a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml index 407efbb2ee..f6bd1219de 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml @@ -130,7 +130,11 @@ - + + Erweiterte Einstellungen (Neustart erforderlich): + + + diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index a1b271ff28..1d36ed64c3 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -165,7 +165,7 @@ Additional code generously contributed to Firestorm by: top_pad="4" width="450" wrap="true"> -Albatroz Hird, Alexie Birman, Andromeda Rage, Angeldark Raymaker, Angus Boyd, Animats, Armin Weatherwax, Casper Warden, Chalice Yao, Chaser Zaks, Chorazin Allen, Cron Stardust, Damian Zhaoying, Dan Threebeards, Dawa Gurbux, Denver Maksim, Drake Arconis, Felyza Wishbringer, f0rbidden, Fractured Crystal, Geenz Spad, Gibson Firehawk, Hitomi Tiponi, Inusaito Sayori, Jean Severine, Katharine Berry, Kittin Ninetails, Kool Koolhoven, Lance Corrimal, Lassie, Latif Khalifa, Laurent Bechir, Magne Metaverse LLC, Magus Freston, Makidoll, Manami Hokkigai, MartinRJ Fayray, McCabe Maxstead, Melancholy Lemon, Melysmile, Mimika Oh, Mister Acacia, MorganMegan, Morgan Pennent, Mysty Saunders, Nagi Michinaga, Name Short, nhede Core, NiranV Dean, Nogardrevlis Lectar, Oren Hurvitz, Paladin Forzane, paperwork, Penny Patton, Peyton Menges, programmtest, Qwerty Venom, Rebecca Ashbourne, Revolution Smythe, Romka Swallowtail, Sahkolihaa Contepomi, sal Kaligawa, Samm Florian, Satomi Ahn, Sei Lisa, Sempervirens Oddfellow, Shin Wasp, Shyotl Kuhr, Sione Lomu, Skills Hak, StarlightShining, Sunset Faulkes, Testicular Slingshot, Thickbrick Sleaford, Ubit Umarov, Vaalith Jinn, Vincent Sylvester, Whirly Fizzle, Xenhat Liamano, Zwagoth Klaar and others. +Albatroz Hird, Alexie Birman, Andromeda Rage, Angeldark Raymaker, Angus Boyd, Animats, Armin Weatherwax, Casper Warden, Chalice Yao, Chaser Zaks, Chorazin Allen, Cron Stardust, Damian Zhaoying, Dan Threebeards, Dawa Gurbux, Denver Maksim, Drake Arconis, Felyza Wishbringer, f0rbidden, Fractured Crystal, Geenz Spad, Gibson Firehawk, Hitomi Tiponi, Inusaito Sayori, Jean Severine, Katharine Berry, Kittin Ninetails, Kool Koolhoven, Lance Corrimal, Lassie, Latif Khalifa, Laurent Bechir, Magne Metaverse LLC, Magus Freston, Makidoll, Manami Hokkigai, MartinRJ Fayray, McCabe Maxstead, Melancholy Lemon, Melysmile, Mimika Oh, Mister Acacia, MorganMegan, Morgan Pennent, Mysty Saunders, Nagi Michinaga, Name Short, nhede Core, NiranV Dean, Nogardrevlis Lectar, Oren Hurvitz, Paladin Forzane, paperwork, Penny Patton, Peyton Menges, programmtest, Qwerty Venom, Rebecca Ashbourne, Revolution Smythe, Romka Swallowtail, Sahkolihaa Contepomi, sal Kaligawa, Samm Florian, Satomi Ahn, Sei Lisa, Sempervirens Oddfellow, Shin Wasp, Shyotl Kuhr, Sione Lomu, Skills Hak, StarlightShining, Sunset Faulkes, Tapple Gao, Testicular Slingshot, Thickbrick Sleaford, Ubit Umarov, Vaalith Jinn, Vincent Sylvester, Whirly Fizzle, Xenhat Liamano, Zwagoth Klaar and others.