mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-04 16:24:29 +01:00
[dxgi] Hack: Report Nvidia cards as AMD cards by default
Prevents UE4 games from repeatedly trying to load nvapi.dll on a performance-critical code path.
This commit is contained in:
parent
bfb7e54218
commit
5d49644cdc
@ -158,6 +158,14 @@ namespace dxvk {
|
|||||||
if (options->customDeviceId >= 0)
|
if (options->customDeviceId >= 0)
|
||||||
deviceProp.deviceID = options->customDeviceId;
|
deviceProp.deviceID = options->customDeviceId;
|
||||||
|
|
||||||
|
// XXX nvapi workaround for a lot of Unreal Engine 4 games
|
||||||
|
if (options->customVendorId < 0 && options->customDeviceId < 0
|
||||||
|
&& deviceProp.vendorID == uint16_t(DxvkGpuVendor::Nvidia)) {
|
||||||
|
Logger::info("DXGI: NvAPI workaround enabled, reporting AMD GPU");
|
||||||
|
deviceProp.vendorID = uint16_t(DxvkGpuVendor::Amd);
|
||||||
|
deviceProp.deviceID = 0x67df; /* RX 480 */
|
||||||
|
}
|
||||||
|
|
||||||
// Convert device name
|
// Convert device name
|
||||||
std::memset(pDesc->Description, 0, sizeof(pDesc->Description));
|
std::memset(pDesc->Description, 0, sizeof(pDesc->Description));
|
||||||
::MultiByteToWideChar(CP_UTF8, 0, deviceProp.deviceName, -1,
|
::MultiByteToWideChar(CP_UTF8, 0, deviceProp.deviceName, -1,
|
||||||
|
Loading…
Reference in New Issue
Block a user