parent
204072d51c
commit
a546aa20b7
|
|
@ -8341,6 +8341,17 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>NvAPISessionOverride</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Override NvAPI driver setting for maxim performance (HACK!!!)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>PurgeCacheOnNextStartup</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -386,27 +386,35 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
|
|||
LL_WARNS() << "Application init failed." << LL_ENDL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
NvAPI_Status status;
|
||||
|
||||
// Initialize NVAPI
|
||||
status = NvAPI_Initialize();
|
||||
NvDRSSessionHandle hSession = 0;
|
||||
|
||||
if (status == NVAPI_OK)
|
||||
{
|
||||
// Create the session handle to access driver settings
|
||||
status = NvAPI_DRS_CreateSession(&hSession);
|
||||
if (status != NVAPI_OK)
|
||||
{
|
||||
nvapi_error(status);
|
||||
}
|
||||
else
|
||||
{
|
||||
//override driver setting as needed
|
||||
ll_nvapi_init(hSession);
|
||||
}
|
||||
}
|
||||
NvDRSSessionHandle hSession = 0;
|
||||
// Viewer shouldn't need NvAPI and this implementation alters global
|
||||
// settings instead of viewer-only ones (SL-4126)
|
||||
// TODO: ideally this should be removed, but temporary disabling
|
||||
// it with a way to turn it back on in case of issues
|
||||
static LLCachedControl<bool> use_nv_api(gSavedSettings, "NvAPISessionOverride", false);
|
||||
if (use_nv_api)
|
||||
{
|
||||
NvAPI_Status status;
|
||||
|
||||
// Initialize NVAPI
|
||||
status = NvAPI_Initialize();
|
||||
|
||||
if (status == NVAPI_OK)
|
||||
{
|
||||
// Create the session handle to access driver settings
|
||||
status = NvAPI_DRS_CreateSession(&hSession);
|
||||
if (status != NVAPI_OK)
|
||||
{
|
||||
nvapi_error(status);
|
||||
}
|
||||
else
|
||||
{
|
||||
//override driver setting as needed
|
||||
ll_nvapi_init(hSession);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Have to wait until after logging is initialized to display LFH info
|
||||
if (num_heaps > 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue