1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-11 19:24:11 +01:00

[dxgi] Add dxgi.nvapiHack option to disable NVAPI workaround

This commit is contained in:
Philip Rebohle 2019-01-10 11:57:09 +01:00
parent 9faf841f32
commit cf9de54a12
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 5 additions and 1 deletions

View File

@ -159,7 +159,7 @@ namespace dxvk {
// XXX nvapi workaround for a lot of Unreal Engine 4 games
if (options->customVendorId < 0 && options->customDeviceId < 0
&& deviceProp.vendorID == uint16_t(DxvkGpuVendor::Nvidia)) {
&& options->nvapiHack && 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 */

View File

@ -40,6 +40,7 @@ namespace dxvk {
this->maxSharedMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxSharedMemory", 0)) << 20;
this->d3d10Enable = config.getOption<bool>("d3d10.enable", true);
this->nvapiHack = config.getOption<bool>("dxgi.nvapiHack", true);
}
}

View File

@ -40,6 +40,9 @@ namespace dxvk {
/// Enables D3D10 support
bool d3d10Enable;
/// Enables nvapi workaround
bool nvapiHack;
};
}