mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
[dxgi,util] Rename dxgi.nvapiHack option to dxgi.hideNvidiaGpu
This commit is contained in:
parent
037669f715
commit
b6a7714e67
5 changed files with 45 additions and 38 deletions
|
@ -64,9 +64,9 @@
|
||||||
# Report Nvidia GPUs as AMD GPUs by default. This is enabled by default
|
# Report Nvidia GPUs as AMD GPUs by default. This is enabled by default
|
||||||
# to work around issues with NVAPI, but may cause issues in some games.
|
# to work around issues with NVAPI, but may cause issues in some games.
|
||||||
#
|
#
|
||||||
# Supported values: True, False
|
# Supported values: Auto, True, False
|
||||||
|
|
||||||
# dxgi.nvapiHack = True
|
# dxgi.hideNvidiaGpu = Auto
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -286,7 +286,7 @@ namespace dxvk {
|
||||||
|
|
||||||
// XXX nvapi workaround for a lot of Unreal Engine 4 games
|
// XXX nvapi workaround for a lot of Unreal Engine 4 games
|
||||||
if (options->customVendorId < 0 && options->customDeviceId < 0
|
if (options->customVendorId < 0 && options->customDeviceId < 0
|
||||||
&& options->nvapiHack && deviceProp.vendorID == uint16_t(DxvkGpuVendor::Nvidia)) {
|
&& options->hideNvidiaGpu && deviceProp.vendorID == uint16_t(DxvkGpuVendor::Nvidia)) {
|
||||||
Logger::info("DXGI: NvAPI workaround enabled, reporting AMD GPU");
|
Logger::info("DXGI: NvAPI workaround enabled, reporting AMD GPU");
|
||||||
deviceProp.vendorID = uint16_t(DxvkGpuVendor::Amd);
|
deviceProp.vendorID = uint16_t(DxvkGpuVendor::Amd);
|
||||||
deviceProp.deviceID = 0x67df; /* RX 480 */
|
deviceProp.deviceID = 0x67df; /* RX 480 */
|
||||||
|
|
|
@ -73,11 +73,17 @@ namespace dxvk {
|
||||||
this->maxDeviceMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxDeviceMemory", 0)) << 20;
|
this->maxDeviceMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxDeviceMemory", 0)) << 20;
|
||||||
this->maxSharedMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxSharedMemory", 0)) << 20;
|
this->maxSharedMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxSharedMemory", 0)) << 20;
|
||||||
|
|
||||||
// Force nvapiHack to be disabled if NvAPI is enabled in environment
|
// Expose Nvidia GPUs properly if NvAPI is enabled in environment
|
||||||
if (env::getEnvVar("DXVK_ENABLE_NVAPI") == "1")
|
this->hideNvidiaGpu = env::getEnvVar("DXVK_ENABLE_NVAPI") != "1";
|
||||||
this->nvapiHack = false;
|
|
||||||
else
|
Tristate hideNvidiaGpuOption = config.getOption<Tristate>("dxgi.hideNvidiaGpu", Tristate::Auto);
|
||||||
this->nvapiHack = config.getOption<bool>("dxgi.nvapiHack", true);
|
|
||||||
|
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);
|
||||||
|
|
||||||
this->enableHDR = config.getOption<bool>("dxgi.enableHDR", env::getEnvVar("DXVK_HDR") == "1");
|
this->enableHDR = config.getOption<bool>("dxgi.enableHDR", env::getEnvVar("DXVK_HDR") == "1");
|
||||||
if (this->enableHDR && isHDRDisallowed()) {
|
if (this->enableHDR && isHDRDisallowed()) {
|
||||||
|
|
|
@ -33,8 +33,9 @@ namespace dxvk {
|
||||||
/// Emulate UMA
|
/// Emulate UMA
|
||||||
bool emulateUMA;
|
bool emulateUMA;
|
||||||
|
|
||||||
/// Enables nvapi workaround
|
/// Reports Nvidia GPUs as a different vendor (usually AMD)
|
||||||
bool nvapiHack;
|
/// in order to work around potential issues with NVAPI.
|
||||||
|
bool hideNvidiaGpu;
|
||||||
|
|
||||||
/// Enable HDR
|
/// Enable HDR
|
||||||
bool enableHDR;
|
bool enableHDR;
|
||||||
|
|
|
@ -56,11 +56,11 @@ namespace dxvk {
|
||||||
* Nvidia. We assume that the Vulkan drivers *
|
* Nvidia. We assume that the Vulkan drivers *
|
||||||
* match the clear behaviour of D3D11. */
|
* match the clear behaviour of D3D11. */
|
||||||
{ R"(\\(farcry3|fc3_blooddragon)_d3d11\.exe$)", {{
|
{ R"(\\(farcry3|fc3_blooddragon)_d3d11\.exe$)", {{
|
||||||
{ "dxgi.nvapiHack", "False" },
|
{ "dxgi.hideNvidiaGpu", "False" },
|
||||||
}} },
|
}} },
|
||||||
/* Far Cry 4: Same as Far Cry 3 */
|
/* Far Cry 4: Same as Far Cry 3 */
|
||||||
{ R"(\\FarCry4\.exe$)", {{
|
{ R"(\\FarCry4\.exe$)", {{
|
||||||
{ "dxgi.nvapiHack", "False" },
|
{ "dxgi.hideNvidiaGpu", "False" },
|
||||||
}} },
|
}} },
|
||||||
/* Frostpunk: Renders one frame with D3D9 *
|
/* Frostpunk: Renders one frame with D3D9 *
|
||||||
* after creating the DXGI swap chain */
|
* after creating the DXGI swap chain */
|
||||||
|
@ -103,15 +103,15 @@ namespace dxvk {
|
||||||
}} },
|
}} },
|
||||||
/* Call of Duty WW2 */
|
/* Call of Duty WW2 */
|
||||||
{ R"(\\s2_sp64_ship\.exe$)", {{
|
{ R"(\\s2_sp64_ship\.exe$)", {{
|
||||||
{ "dxgi.nvapiHack", "False" },
|
{ "dxgi.hideNvidiaGpu", "False" },
|
||||||
}} },
|
}} },
|
||||||
/* Need for Speed 2015 */
|
/* Need for Speed 2015 */
|
||||||
{ R"(\\NFS16\.exe$)", {{
|
{ R"(\\NFS16\.exe$)", {{
|
||||||
{ "dxgi.nvapiHack", "False" },
|
{ "dxgi.hideNvidiaGpu", "False" },
|
||||||
}} },
|
}} },
|
||||||
/* Mass Effect Andromeda */
|
/* Mass Effect Andromeda */
|
||||||
{ R"(\\MassEffectAndromeda\.exe$)", {{
|
{ R"(\\MassEffectAndromeda\.exe$)", {{
|
||||||
{ "dxgi.nvapiHack", "False" },
|
{ "dxgi.hideNvidiaGpu", "False" },
|
||||||
}} },
|
}} },
|
||||||
/* Mirror`s Edge Catalyst: Crashes on AMD */
|
/* Mirror`s Edge Catalyst: Crashes on AMD */
|
||||||
{ R"(\\MirrorsEdgeCatalyst(Trial)?\.exe$)", {{
|
{ R"(\\MirrorsEdgeCatalyst(Trial)?\.exe$)", {{
|
||||||
|
@ -265,7 +265,7 @@ namespace dxvk {
|
||||||
{ R"(\\GoW\.exe$)", {{
|
{ R"(\\GoW\.exe$)", {{
|
||||||
{ "d3d11.ignoreGraphicsBarriers", "True" },
|
{ "d3d11.ignoreGraphicsBarriers", "True" },
|
||||||
{ "d3d11.relaxedBarriers", "True" },
|
{ "d3d11.relaxedBarriers", "True" },
|
||||||
{ "dxgi.nvapiHack", "False" },
|
{ "dxgi.hideNvidiaGpu", "False" },
|
||||||
{ "dxgi.maxFrameLatency", "1" },
|
{ "dxgi.maxFrameLatency", "1" },
|
||||||
}} },
|
}} },
|
||||||
/* AoE 2 DE - runs poorly for some users */
|
/* AoE 2 DE - runs poorly for some users */
|
||||||
|
@ -290,12 +290,12 @@ namespace dxvk {
|
||||||
}} },
|
}} },
|
||||||
/* A Way Out: fix for stuttering and low fps */
|
/* A Way Out: fix for stuttering and low fps */
|
||||||
{ R"(\\AWayOut(_friend)?\.exe$)", {{
|
{ R"(\\AWayOut(_friend)?\.exe$)", {{
|
||||||
{ "dxgi.maxFrameLatency", "1" },
|
{ "dxgi.maxFrameLatency", "1" },
|
||||||
}} },
|
}} },
|
||||||
/* Garden Warfare 2
|
/* Garden Warfare 2
|
||||||
Won't start on amd Id without atiadlxx */
|
Won't start on amd Id without atiadlxx */
|
||||||
{ R"(\\GW2.Main_Win64_Retail\.exe$)", {{
|
{ R"(\\GW2.Main_Win64_Retail\.exe$)", {{
|
||||||
{ "dxgi.customVendorId", "10de" },
|
{ "dxgi.customVendorId", "10de" },
|
||||||
}} },
|
}} },
|
||||||
/* DayZ */
|
/* DayZ */
|
||||||
{ R"(\\DayZ_x64\.exe$)", {{
|
{ R"(\\DayZ_x64\.exe$)", {{
|
||||||
|
@ -310,27 +310,27 @@ namespace dxvk {
|
||||||
/* Metal Gear Solid V: Ground Zeroes *
|
/* Metal Gear Solid V: Ground Zeroes *
|
||||||
* Texture quality can break at high vram */
|
* Texture quality can break at high vram */
|
||||||
{ R"(\\MgsGroundZeroes\.exe$)", {{
|
{ R"(\\MgsGroundZeroes\.exe$)", {{
|
||||||
{ "dxgi.maxDeviceMemory", "4095" },
|
{ "dxgi.maxDeviceMemory", "4095" },
|
||||||
}} },
|
}} },
|
||||||
/* Shantae and the Pirate's Curse *
|
/* Shantae and the Pirate's Curse *
|
||||||
* Game speeds up above 60 fps */
|
* Game speeds up above 60 fps */
|
||||||
{ R"(\\ShantaeCurse\.exe$)", {{
|
{ R"(\\ShantaeCurse\.exe$)", {{
|
||||||
{ "dxgi.maxFrameRate", "60" },
|
{ "dxgi.maxFrameRate", "60" },
|
||||||
}} },
|
}} },
|
||||||
/* Mighty Switch Force! Collection *
|
/* Mighty Switch Force! Collection *
|
||||||
* Games speed up above 60 fps */
|
* Games speed up above 60 fps */
|
||||||
{ R"(\\MSFC\.exe$)", {{
|
{ R"(\\MSFC\.exe$)", {{
|
||||||
{ "dxgi.maxFrameRate", "60" },
|
{ "dxgi.maxFrameRate", "60" },
|
||||||
}} },
|
}} },
|
||||||
/* Cardfight!! Vanguard Dear Days: *
|
/* Cardfight!! Vanguard Dear Days: *
|
||||||
* Submits command lists multiple times */
|
* Submits command lists multiple times */
|
||||||
{ R"(\\VG2\.exe$)", {{
|
{ R"(\\VG2\.exe$)", {{
|
||||||
{ "d3d11.dcSingleUseMode", "False" },
|
{ "d3d11.dcSingleUseMode", "False" },
|
||||||
}} },
|
}} },
|
||||||
/* Battlefield: Bad Company 2 *
|
/* Battlefield: Bad Company 2 *
|
||||||
* Gets rid of black flickering */
|
* Gets rid of black flickering */
|
||||||
{ R"(\\BFBC2Game\.exe$)", {{
|
{ R"(\\BFBC2Game\.exe$)", {{
|
||||||
{ "d3d11.floatControls", "False" },
|
{ "d3d11.floatControls", "False" },
|
||||||
}} },
|
}} },
|
||||||
/* Sonic Frontiers - flickering shadows and *
|
/* Sonic Frontiers - flickering shadows and *
|
||||||
* vegetation when GPU-bound */
|
* vegetation when GPU-bound */
|
||||||
|
@ -345,11 +345,11 @@ namespace dxvk {
|
||||||
/* SpellForce 3 Reforced & expansions *
|
/* SpellForce 3 Reforced & expansions *
|
||||||
* Greatly improves CPU bound performance */
|
* Greatly improves CPU bound performance */
|
||||||
{ R"(\\SF3ClientFinal\.exe$)", {{
|
{ R"(\\SF3ClientFinal\.exe$)", {{
|
||||||
{ "d3d11.cachedDynamicResources", "v" },
|
{ "d3d11.cachedDynamicResources", "v" },
|
||||||
}} },
|
}} },
|
||||||
/* Tom Clancy's Ghost Recon Breakpoint */
|
/* Tom Clancy's Ghost Recon Breakpoint */
|
||||||
{ R"(\\GRB\.exe$)", {{
|
{ R"(\\GRB\.exe$)", {{
|
||||||
{ "dxgi.nvapiHack", "False" },
|
{ "dxgi.hideNvidiaGpu", "False" },
|
||||||
}} },
|
}} },
|
||||||
/* GTA V performance issues */
|
/* GTA V performance issues */
|
||||||
{ R"(\\GTA5\.exe$)", {{
|
{ R"(\\GTA5\.exe$)", {{
|
||||||
|
@ -362,7 +362,7 @@ namespace dxvk {
|
||||||
}} },
|
}} },
|
||||||
/* SnowRunner */
|
/* SnowRunner */
|
||||||
{ R"(\\SnowRunner\.exe$)", {{
|
{ R"(\\SnowRunner\.exe$)", {{
|
||||||
{ "d3d11.dcSingleUseMode", "False" },
|
{ "d3d11.dcSingleUseMode", "False" },
|
||||||
}} },
|
}} },
|
||||||
/* Rockstar Games Launcher */
|
/* Rockstar Games Launcher */
|
||||||
{ R"(\\Rockstar Games\\Launcher\\Launcher\.exe$)", {{
|
{ R"(\\Rockstar Games\\Launcher\\Launcher\.exe$)", {{
|
||||||
|
@ -393,11 +393,11 @@ namespace dxvk {
|
||||||
* pretty suboptimal...
|
* pretty suboptimal...
|
||||||
*/
|
*/
|
||||||
{ R"(\\Fallout76\.exe$)", {{
|
{ R"(\\Fallout76\.exe$)", {{
|
||||||
{ "dxgi.syncInterval", "1" },
|
{ "dxgi.syncInterval", "1" },
|
||||||
}} },
|
}} },
|
||||||
/* Blizzard Entertainment Battle.net */
|
/* Blizzard Entertainment Battle.net */
|
||||||
{ R"(\\Battle.net\.exe$)", {{
|
{ R"(\\Battle.net\.exe$)", {{
|
||||||
{ "dxvk.maxChunkSize", "1" },
|
{ "dxvk.maxChunkSize", "1" },
|
||||||
}} },
|
}} },
|
||||||
/* Bladestorm Nightmare *
|
/* Bladestorm Nightmare *
|
||||||
* Game speed increases when above 60 fps in *
|
* Game speed increases when above 60 fps in *
|
||||||
|
@ -665,7 +665,7 @@ namespace dxvk {
|
||||||
}} },
|
}} },
|
||||||
/* Supreme Commander & Forged Alliance Forever */
|
/* Supreme Commander & Forged Alliance Forever */
|
||||||
{ R"(\\(SupremeCommander|ForgedAlliance)\.exe$)", {{
|
{ R"(\\(SupremeCommander|ForgedAlliance)\.exe$)", {{
|
||||||
{ "d3d9.floatEmulation", "Strict" },
|
{ "d3d9.floatEmulation", "Strict" },
|
||||||
}} },
|
}} },
|
||||||
/* Star Wars The Old Republic */
|
/* Star Wars The Old Republic */
|
||||||
{ R"(\\swtor\.exe$)", {{
|
{ R"(\\swtor\.exe$)", {{
|
||||||
|
@ -678,7 +678,7 @@ namespace dxvk {
|
||||||
}} },
|
}} },
|
||||||
/* Need For Speed 3 modern patch */
|
/* Need For Speed 3 modern patch */
|
||||||
{ R"(\\nfs3\.exe$)", {{
|
{ R"(\\nfs3\.exe$)", {{
|
||||||
{ "d3d9.enableDialogMode", "True" },
|
{ "d3d9.enableDialogMode", "True" },
|
||||||
}} },
|
}} },
|
||||||
/* Beyond Good And Evil *
|
/* Beyond Good And Evil *
|
||||||
* UI breaks at high fps */
|
* UI breaks at high fps */
|
||||||
|
@ -693,15 +693,15 @@ namespace dxvk {
|
||||||
/* YS Origin *
|
/* YS Origin *
|
||||||
* Helps very bad frametimes in some areas */
|
* Helps very bad frametimes in some areas */
|
||||||
{ R"(\\yso_win\.exe$)", {{
|
{ R"(\\yso_win\.exe$)", {{
|
||||||
{ "d3d9.maxFrameLatency", "1" },
|
{ "d3d9.maxFrameLatency", "1" },
|
||||||
}} },
|
}} },
|
||||||
/* Saints Row 2 - Prevents unmap crash */
|
/* Saints Row 2 - Prevents unmap crash */
|
||||||
{ R"(\\SR2_pc\.exe$)", {{
|
{ R"(\\SR2_pc\.exe$)", {{
|
||||||
{ "d3d9.textureMemory", "0" },
|
{ "d3d9.textureMemory", "0" },
|
||||||
}} },
|
}} },
|
||||||
/* Witcher 1: Very long loading times */
|
/* Witcher 1: Very long loading times */
|
||||||
{ R"(\\witcher\.exe$)", {{
|
{ R"(\\witcher\.exe$)", {{
|
||||||
{ "d3d9.cachedDynamicBuffers", "True" },
|
{ "d3d9.cachedDynamicBuffers", "True" },
|
||||||
}} },
|
}} },
|
||||||
/* Guitar Hero World Tour *
|
/* Guitar Hero World Tour *
|
||||||
* Very prone to address space crashes */
|
* Very prone to address space crashes */
|
||||||
|
@ -753,14 +753,14 @@ namespace dxvk {
|
||||||
/* Final Fantasy XIV - Direct3D 9 mode *
|
/* Final Fantasy XIV - Direct3D 9 mode *
|
||||||
* Can crash with unmapping */
|
* Can crash with unmapping */
|
||||||
{ R"(\\ffxiv\.exe$)", {{
|
{ R"(\\ffxiv\.exe$)", {{
|
||||||
{ "d3d9.textureMemory", "0" },
|
{ "d3d9.textureMemory", "0" },
|
||||||
}} },
|
}} },
|
||||||
/* Alien Rage *
|
/* Alien Rage *
|
||||||
* GTX 295 & disable Hack to fix shadows */
|
* GTX 295 & disable Hack to fix shadows */
|
||||||
{ R"(\\(ShippingPC-AFEARGame|ARageMP)\.exe$)", {{
|
{ R"(\\(ShippingPC-AFEARGame|ARageMP)\.exe$)", {{
|
||||||
{ "d3d9.customVendorId", "10de" },
|
{ "d3d9.customVendorId", "10de" },
|
||||||
{ "d3d9.customDeviceId", "05E0" },
|
{ "d3d9.customDeviceId", "05E0" },
|
||||||
{ "dxgi.nvapiHack", "False" },
|
{ "dxgi.hideNvidiaGpu", "False" },
|
||||||
}} },
|
}} },
|
||||||
/* Battle Fantasia Revised Edition *
|
/* Battle Fantasia Revised Edition *
|
||||||
* Speedup above 60fps */
|
* Speedup above 60fps */
|
||||||
|
@ -770,7 +770,7 @@ namespace dxvk {
|
||||||
/* Codename Panzers Phase One/Two *
|
/* Codename Panzers Phase One/Two *
|
||||||
* Main menu won't render after intros */
|
* Main menu won't render after intros */
|
||||||
{ R"(\\(PANZERS|PANZERS_Phase_2)\.exe$)", {{
|
{ R"(\\(PANZERS|PANZERS_Phase_2)\.exe$)", {{
|
||||||
{ "d3d9.enableDialogMode", "True" },
|
{ "d3d9.enableDialogMode", "True" },
|
||||||
}} },
|
}} },
|
||||||
/* DC Universe Online *
|
/* DC Universe Online *
|
||||||
* Freezes after alt tabbing */
|
* Freezes after alt tabbing */
|
||||||
|
@ -780,7 +780,7 @@ namespace dxvk {
|
||||||
/* Halo Online *
|
/* Halo Online *
|
||||||
* Black textures */
|
* Black textures */
|
||||||
{ R"(\\eldorado\.exe$)", {{
|
{ R"(\\eldorado\.exe$)", {{
|
||||||
{ "d3d9.floatEmulation", "Strict" },
|
{ "d3d9.floatEmulation", "Strict" },
|
||||||
}} },
|
}} },
|
||||||
/* Injustice: Gods Among Us *
|
/* Injustice: Gods Among Us *
|
||||||
* Locks a buffer that's still in use */
|
* Locks a buffer that's still in use */
|
||||||
|
@ -807,7 +807,7 @@ namespace dxvk {
|
||||||
/* Diablo 4 - Will complain about missing *
|
/* Diablo 4 - Will complain about missing *
|
||||||
* GPU unless dxgi Id match actual GPU Id */
|
* GPU unless dxgi Id match actual GPU Id */
|
||||||
{ R"(\\Diablo IV\.exe$)", {{
|
{ R"(\\Diablo IV\.exe$)", {{
|
||||||
{ "dxgi.nvapiHack", "False" },
|
{ "dxgi.hideNvidiaGpu", "False" },
|
||||||
}} },
|
}} },
|
||||||
/* WILD HEARTS™️ *
|
/* WILD HEARTS™️ *
|
||||||
* D3D12 title using D3D11 device for *
|
* D3D12 title using D3D11 device for *
|
||||||
|
|
Loading…
Add table
Reference in a new issue