diff --git a/dxvk.conf b/dxvk.conf index d561f658..44b1be67 100644 --- a/dxvk.conf +++ b/dxvk.conf @@ -62,7 +62,7 @@ # Report Nvidia GPUs as AMD GPUs. Unless NVAPI support is explicitly -# enabled through proton, this is done by default in order to work +# enabled through Proton, this is done by default in order to work # around crashes or low performance with Nvidia-speciic code paths # in games, especially Unreal Engine. # @@ -71,6 +71,13 @@ # dxgi.hideNvidiaGpu = Auto +# Report Nvidia GPUs running on NVK as AMD GPUs. +# +# Supported values: Auto, True, False + +# dxgi.hideNvkGpu = Auto + + # Report AMD GPUs as Nvidia GPUs. This is only done for games that are # known to have issues with AMDAGS or other AMD-specific code paths. # diff --git a/src/dxgi/dxgi_adapter.cpp b/src/dxgi/dxgi_adapter.cpp index b7c1b716..2ee5d2cd 100644 --- a/src/dxgi/dxgi_adapter.cpp +++ b/src/dxgi/dxgi_adapter.cpp @@ -272,7 +272,8 @@ namespace dxvk { auto deviceProp = m_adapter->deviceProperties(); auto memoryProp = m_adapter->memoryProperties(); auto vk11 = m_adapter->devicePropertiesExt().vk11; - + auto vk12 = m_adapter->devicePropertiesExt().vk12; + // Custom Vendor / Device ID if (options->customVendorId >= 0) deviceProp.vendorID = options->customVendorId; @@ -298,7 +299,10 @@ namespace dxvk { fallbackDevice = 0x2487; } - bool hideGpu = (deviceProp.vendorID == uint16_t(DxvkGpuVendor::Nvidia) && options->hideNvidiaGpu) + bool hideNvidiaGpu = vk12.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY + ? options->hideNvidiaGpu : options->hideNvkGpu; + + bool hideGpu = (deviceProp.vendorID == uint16_t(DxvkGpuVendor::Nvidia) && hideNvidiaGpu) || (deviceProp.vendorID == uint16_t(DxvkGpuVendor::Amd) && options->hideAmdGpu) || (deviceProp.vendorID == uint16_t(DxvkGpuVendor::Intel) && options->hideIntelGpu); diff --git a/src/dxgi/dxgi_options.cpp b/src/dxgi/dxgi_options.cpp index fe6cebcc..f3a3a492 100644 --- a/src/dxgi/dxgi_options.cpp +++ b/src/dxgi/dxgi_options.cpp @@ -84,14 +84,11 @@ namespace dxvk { this->hideNvidiaGpu = !isNvapiEnabled(); Tristate hideNvidiaGpuOption = config.getOption("dxgi.hideNvidiaGpu", Tristate::Auto); - - if (hideNvidiaGpuOption == Tristate::Auto && !config.getOption("dxgi.nvapiHack", true)) { - Logger::warn("dxgi.nvapiHack is deprecated, please set dxgi.hideNvidiaGpu instead."); - hideNvidiaGpuOption = Tristate::False; - } - applyTristate(this->hideNvidiaGpu, hideNvidiaGpuOption); + // Always hide NVK devices by default since some NVAPI functionality may not work + this->hideNvkGpu = config.getOption("dxgi.hideNvkGpu", Tristate::Auto) == Tristate::True; + // Expose AMD and Intel GPU by default, unless a config override is active. // Implement as a tristate so that we have the option to introduce similar // logic to Nvidia later, if necessary. diff --git a/src/dxgi/dxgi_options.h b/src/dxgi/dxgi_options.h index c0937330..c952ea5e 100644 --- a/src/dxgi/dxgi_options.h +++ b/src/dxgi/dxgi_options.h @@ -33,9 +33,13 @@ namespace dxvk { /// Emulate UMA bool emulateUMA; - /// Reports Nvidia GPUs as a different vendor (usually AMD) + /// Reports Nvidia GPUs running on the proprietary driver as a different + /// vendor (usually AMD). Proton will generally disable this option. bool hideNvidiaGpu; + /// Reports Nvidia GPUs running on NVK as a different vendor (usually AMD) + bool hideNvkGpu; + /// Reports AMD GPUs as a different vendor (usually Nvidia) bool hideAmdGpu; diff --git a/src/util/config/config.cpp b/src/util/config/config.cpp index c48570ec..8943f868 100644 --- a/src/util/config/config.cpp +++ b/src/util/config/config.cpp @@ -58,11 +58,13 @@ namespace dxvk { * Intel needs to match the AMD result */ { R"(\\(farcry3|fc3_blooddragon)_d3d11\.exe$)", {{ { "dxgi.hideNvidiaGpu", "False" }, + { "dxgi.hideNvkGpu", "False" }, { "dxgi.hideIntelGpu", "True" }, }} }, /* Far Cry 4 and Primal: Same as Far Cry 3 */ { R"(\\(FarCry4|FCPrimal)\.exe$)", {{ { "dxgi.hideNvidiaGpu", "False" }, + { "dxgi.hideNvkGpu", "False" }, { "dxgi.hideIntelGpu", "True" }, }} }, /* Frostpunk: Renders one frame with D3D9 * @@ -891,6 +893,7 @@ namespace dxvk { * GPU unless dxgi Id match actual GPU Id */ { R"(\\Diablo IV\.exe$)", {{ { "dxgi.hideNvidiaGpu", "False" }, + { "dxgi.hideNvkGpu", "False" }, }} }, /* WILD HEARTS™️ * * D3D12 title using D3D11 device for *