summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewerwin32.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-04-25 09:13:23 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-04-25 09:13:23 -0400
commitf162693a23fe5cfda8dab3857718624033812d30 (patch)
tree0768f9ea570b248b48e4caa33103e3d55c625466 /indra/newview/llappviewerwin32.cpp
parentd8931c9269a90cd01f6f6ff4de83b8fb41df11d3 (diff)
parentd98fc504a1d4bc292ba86acdda053c8b4598a193 (diff)
Merge Maint YZ branch 'main' into DRTVWR-588-cleanup-timers
Diffstat (limited to 'indra/newview/llappviewerwin32.cpp')
-rw-r--r--indra/newview/llappviewerwin32.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 298d841934..41101e79a6 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -369,6 +369,35 @@ void ll_nvapi_init(NvDRSSessionHandle hSession)
nvapi_error(status);
return;
}
+
+ // enable Threaded Optimization instead of letting the driver decide
+ status = NvAPI_DRS_GetSetting(hSession, hProfile, OGL_THREAD_CONTROL_ID, &drsSetting);
+ if (status == NVAPI_SETTING_NOT_FOUND || (status == NVAPI_OK && drsSetting.u32CurrentValue != OGL_THREAD_CONTROL_ENABLE))
+ {
+ drsSetting.version = NVDRS_SETTING_VER;
+ drsSetting.settingId = OGL_THREAD_CONTROL_ID;
+ drsSetting.settingType = NVDRS_DWORD_TYPE;
+ drsSetting.u32CurrentValue = OGL_THREAD_CONTROL_ENABLE;
+ status = NvAPI_DRS_SetSetting(hSession, hProfile, &drsSetting);
+ if (status != NVAPI_OK)
+ {
+ nvapi_error(status);
+ return;
+ }
+
+ // Now we apply (or save) our changes to the system
+ status = NvAPI_DRS_SaveSettings(hSession);
+ if (status != NVAPI_OK)
+ {
+ nvapi_error(status);
+ return;
+ }
+ }
+ else if (status != NVAPI_OK)
+ {
+ nvapi_error(status);
+ return;
+ }
}
//#define DEBUGGING_SEH_FILTER 1
@@ -720,13 +749,15 @@ bool LLAppViewerWin32::init()
DWORD dwFlags = MDSF_NONINTERACTIVE | // automatically submit report without prompting
MDSF_PREVENTHIJACKING; // disallow swiping Exception filter
- bool needs_log_file = !isSecondInstance() && debugLoggingEnabled("BUGSPLAT");
+ bool needs_log_file = !isSecondInstance();
+ LL_DEBUGS("BUGSPLAT");
if (needs_log_file)
{
// Startup only!
LL_INFOS("BUGSPLAT") << "Engaged BugSplat logging to bugsplat.log" << LL_ENDL;
dwFlags |= MDSF_LOGFILE | MDSF_LOG_VERBOSE;
}
+ LL_ENDL;
// have to convert normal wide strings to strings of __wchar_t
sBugSplatSender = new MiniDmpSender(
@@ -737,12 +768,14 @@ bool LLAppViewerWin32::init()
dwFlags);
sBugSplatSender->setCallback(bugsplatSendLog);
+ LL_DEBUGS("BUGSPLAT");
if (needs_log_file)
{
// Log file will be created in %TEMP%, but it will be moved into logs folder in case of crash
std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "bugsplat.log");
sBugSplatSender->setLogFilePath(WCSTR(log_file));
}
+ LL_ENDL;
// engage stringize() overload that converts from wstring
LL_INFOS("BUGSPLAT") << "Engaged BugSplat(" << LL_TO_STRING(LL_VIEWER_CHANNEL)