mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Only run NVIDIA Reflex if the display driver vendor is NVIDIA
This is to ensure we don't cause any performance hits when running the game on an AMD or Intel GPU.
This commit is contained in:
parent
a639a4befd
commit
eaa5347fa3
@ -17,6 +17,7 @@
|
||||
#include "engine/traceinit.h"
|
||||
#ifndef DEDICATED
|
||||
#include "engine/sys_mainwind.h"
|
||||
#include "materialsystem/cmaterialsystem.h"
|
||||
#include "windows/id3dx.h"
|
||||
#include "client/vengineclient_impl.h"
|
||||
#include "geforce/reflex.h"
|
||||
@ -183,6 +184,12 @@ bool CEngineAPI::MainLoop()
|
||||
}
|
||||
|
||||
#ifndef DEDICATED
|
||||
const MaterialAdapterInfo_t& adapterInfo = g_pMaterialAdapterMgr->GetAdapterInfo();
|
||||
|
||||
// Only run on NVIDIA display drivers; AMD and Intel are not
|
||||
// supported by NVIDIA Reflex.
|
||||
if (adapterInfo.m_VendorID == NVIDIA_VENDOR_ID)
|
||||
{
|
||||
if (GFX_HasPendingLowLatencyParameterUpdates())
|
||||
{
|
||||
const bool bUseLowLatencyMode = gfx_nvnUseLowLatency->GetBool();
|
||||
@ -209,6 +216,8 @@ bool CEngineAPI::MainLoop()
|
||||
}
|
||||
|
||||
GFX_RunLowLatencyFrame(D3D11Device());
|
||||
}
|
||||
|
||||
CEngineAPI::PumpMessages();
|
||||
#endif // !DEDICATED
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user