diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-12-06 11:59:05 -0600 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-12-06 11:59:05 -0600 |
commit | 5e8b0fb646791bb1f914b0d279042910b710c8ef (patch) | |
tree | 384303fd5844bffb61f9281a30666186397595ef /indra | |
parent | 300d7629d8bbd02844a5380cc97aae2d229fdf0a (diff) | |
parent | 18919ef585082becd984eb4d90310cd317babfc9 (diff) |
Merge branch 'DRTVWR-596' of github.com:secondlife/viewer into DRTVWR-596
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llappviewerwin32.cpp | 29 |
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 |