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
+
FSForcedVideoMemory
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.
+
+ WARNING: Overriding the VRAM detection may cause instability.
+
+Most users should leave this setting disabled and let the viewer and operating system determine the correct value.
+
+This setting is intended for cases where VRAM detection is reporting incorrect values. Use with caution, seek support advice in case of doubt.
+
+
+
+
+ Advanced Settings (restart required):
+
+
+
+
diff --git a/indra/newview/skins/default/xui/fr/floater_inventory_thumbnails_helper.xml b/indra/newview/skins/default/xui/fr/floater_inventory_thumbnails_helper.xml
new file mode 100644
index 0000000000..9c593ad53d
--- /dev/null
+++ b/indra/newview/skins/default/xui/fr/floater_inventory_thumbnails_helper.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/indra/newview/skins/default/xui/fr/menu_gallery_outfit_tab.xml b/indra/newview/skins/default/xui/fr/menu_gallery_outfit_tab.xml
index 2994431eb4..2155e724b5 100644
--- a/indra/newview/skins/default/xui/fr/menu_gallery_outfit_tab.xml
+++ b/indra/newview/skins/default/xui/fr/menu_gallery_outfit_tab.xml
@@ -1,9 +1,13 @@
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
diff --git a/indra/newview/skins/default/xui/fr/menu_inventory.xml b/indra/newview/skins/default/xui/fr/menu_inventory.xml
index 176c28e487..67b7ff7355 100644
--- a/indra/newview/skins/default/xui/fr/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/fr/menu_inventory.xml
@@ -21,6 +21,7 @@
+