summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewerwin32.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-01-09 10:14:41 +0800
committerErik Kundiman <erik@megapahit.org>2024-01-09 10:14:41 +0800
commitf6dec0bf7b9baa990fa26398e77faf5a410b8be6 (patch)
tree9ed732e6801157018faff52d4782c2688fefdd73 /indra/newview/llappviewerwin32.cpp
parent0fd4a8b59677e1a85d19308379ab9967345749dc (diff)
parent3c858d7e2d6633df14df473a918d2fb848403972 (diff)
Merge tag '7.1.2-release'
source for viewer 7.1.2.7215179142
Diffstat (limited to 'indra/newview/llappviewerwin32.cpp')
-rw-r--r--indra/newview/llappviewerwin32.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 8cf80f388b..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