mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[dxgi] Add separate option to override vendor IDs for NVK
This commit is contained in:
parent
20490b678f
commit
0414bbe2d5
@ -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.
|
||||
#
|
||||
|
@ -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);
|
||||
|
||||
|
@ -84,14 +84,11 @@ namespace dxvk {
|
||||
this->hideNvidiaGpu = !isNvapiEnabled();
|
||||
|
||||
Tristate hideNvidiaGpuOption = config.getOption<Tristate>("dxgi.hideNvidiaGpu", Tristate::Auto);
|
||||
|
||||
if (hideNvidiaGpuOption == Tristate::Auto && !config.getOption<bool>("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<Tristate>("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.
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 *
|
||||
|
Loading…
x
Reference in New Issue
Block a user