summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llprocessor.cpp89
-rw-r--r--indra/llcommon/llprocessor.h3
-rw-r--r--indra/llcommon/llsys.cpp35
-rw-r--r--indra/llcommon/llsys.h8
-rw-r--r--indra/llcommon/llwatchdog.h5
-rw-r--r--indra/newview/llappviewer.cpp13
-rw-r--r--indra/newview/llavataractions.cpp11
-rw-r--r--indra/newview/llavataractions.h6
-rw-r--r--indra/newview/lltexturefetch.cpp18
-rw-r--r--indra/newview/llviewermenu.cpp43
-rw-r--r--indra/newview/llviewernetwork.h11
-rw-r--r--indra/newview/llviewerparcelmgr.cpp8
-rw-r--r--indra/newview/llviewerstats.cpp15
-rw-r--r--indra/newview/tests/llslurl_test.cpp2
-rw-r--r--indra/newview/tests/llviewernetwork_test.cpp2
15 files changed, 237 insertions, 32 deletions
diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp
index 9d0ef45bee..456f2b02d4 100644
--- a/indra/llcommon/llprocessor.cpp
+++ b/indra/llcommon/llprocessor.cpp
@@ -123,6 +123,9 @@ namespace
eSSE4_1_Features = 38,
eSSE4_2_Features = 39,
eSSE4a_Features = 40,
+ eAVX_Features = 41,
+ eAVX2_Features = 42,
+ eAVX512F_Features = 43,
};
const char* cpu_feature_names[] =
@@ -170,6 +173,9 @@ namespace
"SSE4.1 Instructions",
"SSE4.2 Instructions",
"SSE4a Instructions",
+ "AVX Instructions", // 41
+ "AVX2 Instructions", // 42
+ "AVX-512F Instructions", // 43
};
std::string intel_CPUFamilyName(int composed_family)
@@ -283,6 +289,21 @@ public:
return hasExtension(cpu_feature_names[eSSE4a_Features]);
}
+ bool hasAVX() const
+ {
+ return hasExtension(cpu_feature_names[eAVX_Features]);
+ }
+
+ bool hasAVX2() const
+ {
+ return hasExtension(cpu_feature_names[eAVX2_Features]);
+ }
+
+ bool hasAVX512F() const
+ {
+ return hasExtension(cpu_feature_names[eAVX512F_Features]);
+ }
+
bool hasAltivec() const
{
return hasExtension("Altivec");
@@ -572,6 +593,12 @@ private:
setExtension(cpu_feature_names[eSSE4_2_Features]);
}
+ // AVX: CPUID leaf 1, ECX bit 28, OSXSAVE + XCR0[1:2] enabled
+ if ((cpu_info[2] & 0x18000000) == 0x18000000 && ((_xgetbv(0) & 0x6) == 0x6))
+ {
+ setExtension(cpu_feature_names[eAVX_Features]);
+ }
+
unsigned int feature_info = (unsigned int) cpu_info[3];
for(unsigned int index = 0, bit = 1; index < eSSE3_Features; ++index, bit <<= 1)
{
@@ -581,6 +608,27 @@ private:
}
}
}
+ else if (i == 7)
+ {
+ // AVX2/AVX-512* require AVX to be usable (OSXSAVE + XCR0 state)
+ if (hasExtension(cpu_feature_names[eAVX_Features]))
+ {
+ int cpu_info7[4] = { -1 };
+ __cpuidex(cpu_info7, 7, 0);
+ // AVX2: EBX bit 5
+ if (cpu_info7[1] & 0x20)
+ {
+ setExtension(cpu_feature_names[eAVX2_Features]);
+ }
+
+ // AVX-512F: EBX bit 16; ZMM state in XCR0 (bits 5-7)
+ const unsigned long long xcr0 = _xgetbv(0);
+ if ((cpu_info7[1] & 0x10000) && ((xcr0 & 0xE6) == 0xE6))
+ {
+ setExtension(cpu_feature_names[eAVX512F_Features]);
+ }
+ }
+ }
}
// Calling __cpuid with 0x80000000 as the InfoType argument
@@ -779,6 +827,29 @@ private:
// Not supposed to happen?
setExtension(cpu_feature_names[eSSE4a_Features]);
}
+ if (cpu_features_str.find(" AVX1.0 ") != std::string::npos)
+ {
+ setExtension(cpu_feature_names[eAVX_Features]);
+ }
+
+ // AVX2 and AVX-512F are reported in machdep.cpu.leaf7_features on macOS
+ char cpu_leaf7_features[1024];
+ len = sizeof(cpu_leaf7_features);
+ memset(cpu_leaf7_features, 0, len);
+ sysctlbyname("machdep.cpu.leaf7_features", (void*)cpu_leaf7_features, &len, NULL, 0);
+
+ std::string cpu_leaf7_str(cpu_leaf7_features);
+ cpu_leaf7_str = " " + cpu_leaf7_str + " ";
+
+ if (cpu_leaf7_str.find(" AVX2 ") != std::string::npos)
+ {
+ setExtension(cpu_feature_names[eAVX2_Features]);
+ }
+
+ if (cpu_leaf7_str.find(" AVX512F ") != std::string::npos)
+ {
+ setExtension(cpu_feature_names[eAVX512F_Features]);
+ }
}
};
@@ -946,6 +1017,21 @@ private:
setExtension(cpu_feature_names[eSSE4a_Features]);
}
+ if (flags.find(" avx ") != std::string::npos)
+ {
+ setExtension(cpu_feature_names[eAVX_Features]);
+ }
+
+ if (flags.find(" avx2 ") != std::string::npos)
+ {
+ setExtension(cpu_feature_names[eAVX2_Features]);
+ }
+
+ if (flags.find(" avx512f ") != std::string::npos)
+ {
+ setExtension(cpu_feature_names[eAVX512F_Features]);
+ }
+
# endif // LL_X86
}
@@ -1010,6 +1096,9 @@ bool LLProcessorInfo::hasSSE3S() const { return mImpl->hasSSE3S(); }
bool LLProcessorInfo::hasSSE41() const { return mImpl->hasSSE41(); }
bool LLProcessorInfo::hasSSE42() const { return mImpl->hasSSE42(); }
bool LLProcessorInfo::hasSSE4a() const { return mImpl->hasSSE4a(); }
+bool LLProcessorInfo::hasAVX() const { return mImpl->hasAVX(); }
+bool LLProcessorInfo::hasAVX2() const { return mImpl->hasAVX2(); }
+bool LLProcessorInfo::hasAVX512F() const { return mImpl->hasAVX512F(); }
bool LLProcessorInfo::hasAltivec() const { return mImpl->hasAltivec(); }
std::string LLProcessorInfo::getCPUFamilyName() const { return mImpl->getCPUFamilyName(); }
std::string LLProcessorInfo::getCPUBrandName() const { return mImpl->getCPUBrandName(); }
diff --git a/indra/llcommon/llprocessor.h b/indra/llcommon/llprocessor.h
index b955f7f55c..da93a531f4 100644
--- a/indra/llcommon/llprocessor.h
+++ b/indra/llcommon/llprocessor.h
@@ -46,6 +46,9 @@ public:
bool hasSSE41() const;
bool hasSSE42() const;
bool hasSSE4a() const;
+ bool hasAVX() const;
+ bool hasAVX2() const;
+ bool hasAVX512F() const;
bool hasAltivec() const;
std::string getCPUFamilyName() const;
std::string getCPUBrandName() const;
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index b1b281001e..bc38b72004 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -580,6 +580,9 @@ LLCPUInfo::LLCPUInfo()
mHasSSE41 = proc.hasSSE41();
mHasSSE42 = proc.hasSSE42();
mHasSSE4a = proc.hasSSE4a();
+ mHasAVX = proc.hasAVX();
+ mHasAVX2 = proc.hasAVX2();
+ mHasAVX512F = proc.hasAVX512F();
mHasAltivec = proc.hasAltivec();
mCPUMHz = (F64)proc.getCPUFrequency();
mFamily = proc.getCPUFamilyName();
@@ -621,6 +624,18 @@ LLCPUInfo::LLCPUInfo()
{
mSSEVersions.append("4a");
}
+ if (mHasAVX)
+ {
+ mSIMDVersions.append("AVX");
+ }
+ if (mHasAVX2)
+ {
+ mSIMDVersions.append("AVX2");
+ }
+ if (mHasAVX512F)
+ {
+ mSIMDVersions.append("AVX-512F");
+ }
}
bool LLCPUInfo::hasAltivec() const
@@ -663,6 +678,21 @@ bool LLCPUInfo::hasSSE4a() const
return mHasSSE4a;
}
+bool LLCPUInfo::hasAVX() const
+{
+ return mHasAVX;
+}
+
+bool LLCPUInfo::hasAVX2() const
+{
+ return mHasAVX2;
+}
+
+bool LLCPUInfo::hasAVX512F() const
+{
+ return mHasAVX512F;
+}
+
F64 LLCPUInfo::getMHz() const
{
return mCPUMHz;
@@ -678,6 +708,11 @@ const LLSD& LLCPUInfo::getSSEVersions() const
return mSSEVersions;
}
+const LLSD& LLCPUInfo::getSIMDVersions() const
+{
+ return mSIMDVersions;
+}
+
void LLCPUInfo::stream(std::ostream& s) const
{
// gather machine information.
diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h
index 0abbe047ad..aeba5563ba 100644
--- a/indra/llcommon/llsys.h
+++ b/indra/llcommon/llsys.h
@@ -81,6 +81,7 @@ public:
std::string getCPUString() const;
const LLSD& getSSEVersions() const;
+ const LLSD& getSIMDVersions() const;
bool hasAltivec() const;
bool hasSSE() const;
@@ -90,6 +91,9 @@ public:
bool hasSSE41() const;
bool hasSSE42() const;
bool hasSSE4a() const;
+ bool hasAVX() const;
+ bool hasAVX2() const;
+ bool hasAVX512F() const;
F64 getMHz() const;
// Family is "AMD Duron" or "Intel Pentium Pro"
@@ -103,11 +107,15 @@ private:
bool mHasSSE41;
bool mHasSSE42;
bool mHasSSE4a;
+ bool mHasAVX;
+ bool mHasAVX2;
+ bool mHasAVX512F;
bool mHasAltivec;
F64 mCPUMHz;
std::string mFamily;
std::string mCPUString;
LLSD mSSEVersions;
+ LLSD mSIMDVersions;
};
//=============================================================================
diff --git a/indra/llcommon/llwatchdog.h b/indra/llcommon/llwatchdog.h
index a3a51113b0..9386bd6bb3 100644
--- a/indra/llcommon/llwatchdog.h
+++ b/indra/llcommon/llwatchdog.h
@@ -93,6 +93,11 @@ public:
LLWatchdog();
~LLWatchdog();
+ LLWatchdog(const LLWatchdog&) = delete;
+ LLWatchdog(LLWatchdog&&) = delete;
+ LLWatchdog& operator=(const LLWatchdog&) = delete;
+ LLWatchdog& operator=(LLWatchdog&&) = delete;
+
// Add an entry to the watchdog.
void add(LLWatchdogEntry* e);
void remove(LLWatchdogEntry* e);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index e9d01c6735..35a2cc1852 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2178,6 +2178,7 @@ bool LLAppViewer::cleanup()
LLWorld::deleteSingleton();
LLVoiceClient::deleteSingleton();
LLUI::deleteSingleton();
+ LLGridManager::deleteSingleton();
LLWatchdog::deleteSingleton();
// It's not at first obvious where, in this long sequence, a generic cleanup
@@ -3012,6 +3013,8 @@ bool LLAppViewer::initConfiguration()
}
}
+ LLGridManager::createInstance();
+
LLSLURL start_slurl;
if (!starting_location.empty())
{
@@ -3060,6 +3063,7 @@ bool LLAppViewer::initConfiguration()
// Do not save settings.
// Might be smarter to have an exit code for a more reliable
// "early exit, needs cleanup" case.
+ LLGridManager::deleteSingleton();
LLSingletonBase::deleteAll();
cleanupConsole();
delete mSettingsLocationList;
@@ -3120,6 +3124,7 @@ bool LLAppViewer::initConfiguration()
// Since returning 'false' is basically an error without cleanup,
// do cleanup here. No need to worry about marker files here.
+ LLGridManager::deleteSingleton();
LLSingletonBase::deleteAll();
cleanupConsole();
return false;
@@ -3885,8 +3890,12 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily();
gDebugInfo["CPUInfo"]["CPUMhz"] = (S32)gSysCPU.getMHz();
gDebugInfo["CPUInfo"]["CPUAltivec"] = gSysCPU.hasAltivec();
- gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE();
- gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2();
+ gDebugInfo["CPUInfo"]["CPUSSE42"] = gSysCPU.hasSSE42();
+ gDebugInfo["CPUInfo"]["CPUSSE4a"] = gSysCPU.hasSSE4a();
+ gDebugInfo["CPUInfo"]["CPUAVX"] = gSysCPU.hasAVX();
+ gDebugInfo["CPUInfo"]["CPUAVX2"] = gSysCPU.hasAVX2();
+ gDebugInfo["CPUInfo"]["CPUAVX512F"] = gSysCPU.hasAVX512F();
+
gDebugInfo["RAMInfo"]["Physical"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().value());
gDebugInfo["RAMInfo"]["Allocated"] = LLSD::Integer(gMemoryAllocated.valueInUnits<LLUnits::Kilobytes>());
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index c95e98982d..b6d59a4a39 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -337,6 +337,17 @@ void LLAvatarActions::showProfile(const LLUUID& avatar_id)
}
}
+bool LLAvatarActions::myProfileVisible()
+{
+ LLFloater* floaterp = getProfileFloater(gAgentID);
+ return floaterp && floaterp->isInVisibleChain();
+}
+
+bool LLAvatarActions::myPicksTabVisible()
+{
+ return myProfileVisible() && isPickTabSelected(gAgentID);
+}
+
// static
void LLAvatarActions::showPicks(const LLUUID& avatar_id)
{
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 1f5a42ed22..90f1e96fb7 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -109,6 +109,12 @@ public:
static LLFloater* getProfileFloater(const LLUUID& avatar_id);
/**
+ * Profile helpers.
+ */
+ static bool myProfileVisible();
+ static bool myPicksTabVisible();
+
+ /**
* Show avatar on world map.
*/
static void showOnMap(const LLUUID& id);
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 144940c705..a0d7aac3f3 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -2527,18 +2527,26 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L
{
LL_DEBUGS("Avatar") << " requesting " << id << " " << w << "x" << h << " discard " << desired_discard << " type " << f_type << LL_ENDL;
}
- LLTextureFetchWorker* worker = getWorker(id);
+
+ // Potentially we might remove a request, lock queue here instead
+ // of getWorker to make sure request will persist till removeRequest
+ lockQueue();
+ LLTextureFetchWorker* worker = getWorkerAfterLock(id);
if (worker)
{
if (worker->mHost != host)
{
LL_WARNS(LOG_TXT) << "LLTextureFetch::createRequest " << id << " called with multiple hosts: "
<< host << " != " << worker->mHost << LL_ENDL;
- removeRequest(worker, true);
+ size_t erased_1 = mRequestMap.erase(worker->mID);
+ llassert_always(erased_1 > 0);
+ unlockQueue();
+ worker->scheduleDelete();
worker = NULL;
return CREATE_REQUEST_ERROR_MHOSTS;
}
}
+ unlockQueue();
S32 desired_size;
std::string exten = gDirUtilp->getExtension(url);
@@ -2717,9 +2725,11 @@ void LLTextureFetch::deleteAllRequests()
}
LLTextureFetchWorker* worker = mRequestMap.begin()->second;
- unlockQueue() ;
+ size_t erased_1 = mRequestMap.erase(worker->mID);
+ llassert_always(erased_1 > 0);
+ unlockQueue();
- removeRequest(worker, true);
+ worker->scheduleDelete();
}
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 72ad47be89..a8eee07729 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -4052,17 +4052,6 @@ void handle_avatar_eject(const LLSD& avatar_id)
}
}
-bool my_profile_visible()
-{
- LLFloater* floaterp = LLAvatarActions::getProfileFloater(gAgentID);
- return floaterp && floaterp->isInVisibleChain();
-}
-
-bool picks_tab_visible()
-{
- return my_profile_visible() && LLAvatarActions::isPickTabSelected(gAgentID);
-}
-
bool enable_freeze_eject(const LLSD& avatar_id)
{
// Use avatar_id if available, otherwise default to right-click avatar
@@ -6749,7 +6738,7 @@ class LLAvatarTogglePicks : public view_listener_t
instance->setFocus(true);
LLAvatarActions::showPicks(gAgent.getID());
}
- else if (picks_tab_visible())
+ else if (LLAvatarActions::myPicksTabVisible())
{
instance->closeFloater();
}
@@ -9792,6 +9781,23 @@ void show_topinfobar_context_menu(LLView* ctrl, S32 x, S32 y)
LLMenuGL::showPopup(ctrl, show_topbarinfo_context_menu, x, y);
}
+static void register_agent_ui_callbacks()
+{
+ // These functions are used by menu and commands, they need to persist for the lifetime of the application
+ // Note: executes before LLToolBar::createButton and before menu builds
+ LLUICtrl::EnableCallbackRegistry::Registrar& global_enable = LLUICtrl::EnableCallbackRegistry::defaultRegistrar();
+ LLUICtrl::CommitCallbackRegistry::Registrar& global_commit = LLUICtrl::CommitCallbackRegistry::defaultRegistrar();
+ global_commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying));
+ global_enable.add("Agent.enableFlyLand", boost::bind(&enable_fly_land));
+ global_commit.add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2));
+ global_commit.add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2));
+ global_commit.add("Agent.ToggleMicrophone", boost::bind(&LLAgent::toggleMicrophone, _2));
+ global_enable.add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2));
+ global_enable.add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2));
+ global_enable.add("Avatar.IsMyProfileOpen", boost::bind(&LLAvatarActions::myProfileVisible));
+ global_enable.add("Avatar.IsPicksTabOpen", boost::bind(&LLAvatarActions::myPicksTabVisible));
+}
+
void initialize_edit_menu()
{
view_listener_t::addMenu(new LLEditUndo(), "Edit.Undo");
@@ -9849,6 +9855,8 @@ void initialize_menus()
bool mMult;
};
+ register_agent_ui_callbacks();
+
LLUICtrl::EnableCallbackRegistry::Registrar& enable = LLUICtrl::EnableCallbackRegistry::currentRegistrar();
LLUICtrl::CommitCallbackRegistry::Registrar& commit = LLUICtrl::CommitCallbackRegistry::currentRegistrar();
@@ -9864,15 +9872,6 @@ void initialize_menus()
enable.add("Conversation.IsConversationLoggingAllowed", boost::bind(&LLFloaterIMContainer::isConversationLoggingAllowed));
- // Agent
- commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying));
- enable.add("Agent.enableFlyLand", boost::bind(&enable_fly_land));
- commit.add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2));
- commit.add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2));
- commit.add("Agent.ToggleMicrophone", boost::bind(&LLAgent::toggleMicrophone, _2));
- enable.add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2));
- enable.add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2));
-
// File menu
init_menu_file();
@@ -10237,8 +10236,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLAvatarResetSkeletonAndAnimations(), "Avatar.ResetSkeletonAndAnimations");
view_listener_t::addMenu(new LLAvatarResetSelfSkeleton(), "Avatar.ResetSelfSkeleton");
view_listener_t::addMenu(new LLAvatarResetSelfSkeletonAndAnimations(), "Avatar.ResetSelfSkeletonAndAnimations");
- enable.add("Avatar.IsMyProfileOpen", boost::bind(&my_profile_visible));
- enable.add("Avatar.IsPicksTabOpen", boost::bind(&picks_tab_visible));
commit.add("Avatar.OpenMarketplace", boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL")));
diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h
index 0937425a18..18c23cf7ff 100644
--- a/indra/newview/llviewernetwork.h
+++ b/indra/newview/llviewernetwork.h
@@ -57,13 +57,18 @@ protected:
* This class maintains the currently selected grid, and provides short
* form accessors for each of the properties of the selected grid.
**/
-class LLGridManager : public LLSingleton<LLGridManager>
+class LLGridManager : public LLSimpleton<LLGridManager>
{
+public:
/// Instantiate the grid manager, load default grids, selects the default grid
- LLSINGLETON(LLGridManager);
+ LLGridManager();
~LLGridManager();
- public:
+ LLGridManager(const LLGridManager&) = delete;
+ LLGridManager(LLGridManager&&) = delete;
+ LLGridManager& operator=(const LLGridManager&) = delete;
+ LLGridManager& operator=(LLGridManager&&) = delete;
+
/* ================================================================
* @name Initialization and Configuration
* @{
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index b794047135..63eb08e4ae 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -309,6 +309,14 @@ void LLViewerParcelMgr::resetSegments(U8* segments)
void LLViewerParcelMgr::writeHighlightSegments(F32 west, F32 south, F32 east,
F32 north)
{
+ if (west < 0 || south < 0 || east < 0 || north < 0)
+ {
+ LL_WARNS() << "Invalid parcel edge coordinates provided to writeHighlightSegments- "
+ << "west: " << west << ", south: " << south << ", east: " << east << ", north: " << north
+ << LL_ENDL;
+ return;
+ }
+
S32 x, y;
S32 min_x = ll_round( west / PARCEL_GRID_STEP_METERS );
S32 max_x = ll_round( east / PARCEL_GRID_STEP_METERS );
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 45f7058acb..742ff95f26 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -716,6 +716,8 @@ void send_viewer_stats(bool include_preferences)
system["os"] = LLOSInfo::instance().getOSStringSimple();
system["cpu"] = gSysCPU.getCPUString();
system["cpu_sse"] = gSysCPU.getSSEVersions();
+ system["cpu_simd"] = gSysCPU.getSIMDVersions();
+ system["cpu_mhz"] = gSysCPU.getMHz();
system["address_size"] = ADDRESS_SIZE;
system["os_bitness"] = LLOSInfo::instance().getOSBitness();
system["hardware_concurrency"] = (LLSD::Integer) std::thread::hardware_concurrency();
@@ -738,6 +740,19 @@ void send_viewer_stats(bool include_preferences)
system["gpu_vendor"] = gGLManager.mGLVendorShort;
system["gpu_version"] = gGLManager.mDriverVersionVendorString;
system["opengl_version"] = gGLManager.mGLVersionString;
+ system["gpu_vram_mb"] = (S32)gGLManager.mVRAM;
+ system["glsl_version"] = llformat("%d.%d", gGLManager.mGLSLVersionMajor, gGLManager.mGLSLVersionMinor);
+
+ // Resource usage
+ // getAvailableMemKB might be a bit stale, but that's fine, this is statistics,
+ // not a debug tool.
+ // TODO: 26.3 branch introduced getAvailableCommitMemMB, use that on windows
+ system["ram_avail_mb"] = (S32Megabytes)(LLMemory::getAvailableMemKB()).value();
+ system["ram_allocated_mb"] = (S32Megabytes)(LLMemory::getAllocatedMemKB()).value();
+ static constexpr F64 BYTES_TO_MB = 1024.0 * 1024.0;
+ F64 texture_bytes_alloc = LLImageGL::getTextureBytesAllocated() / BYTES_TO_MB;
+ F64 vertex_bytes_alloc = LLVertexBuffer::getBytesAllocated() / BYTES_TO_MB;
+ system["gpu_vram_tracked_mb"] = (F32)(texture_bytes_alloc + vertex_bytes_alloc);
gGLManager.asLLSD(system["gl"]);
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index 3ff38ea372..bf23538201 100644
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -147,10 +147,12 @@ namespace tut
{
slurlTest()
{
+ LLGridManager::createInstance();
LLGridManager::getInstance()->initialize(std::string(""));
}
~slurlTest()
{
+ LLGridManager::deleteSingleton();
}
};
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index 1cbb8b50eb..6190d7052b 100644
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -175,6 +175,7 @@ namespace tut
{
viewerNetworkTest()
{
+ LLGridManager::createInstance();
LLFile::remove(TEST_FILENAME);
gCmdLineLoginURI.clear();
gCmdLineGridChoice.clear();
@@ -185,6 +186,7 @@ namespace tut
~viewerNetworkTest()
{
LLFile::remove(TEST_FILENAME);
+ LLGridManager::deleteSingleton();
}
};