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:
Kawe Mazidjatari 2023-09-13 22:24:59 +02:00
parent a639a4befd
commit eaa5347fa3

View File

@ -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