2021-09-19 16:20:57 +02:00
|
|
|
|
#include <array>
|
2018-08-07 16:58:16 +02:00
|
|
|
|
#include <fstream>
|
|
|
|
|
#include <sstream>
|
|
|
|
|
#include <iostream>
|
2019-08-17 11:46:56 +02:00
|
|
|
|
#include <regex>
|
2021-09-19 16:20:57 +02:00
|
|
|
|
#include <utility>
|
2018-08-07 16:58:16 +02:00
|
|
|
|
|
2018-08-07 14:13:57 +02:00
|
|
|
|
#include "config.h"
|
|
|
|
|
|
2018-08-07 16:58:16 +02:00
|
|
|
|
#include "../log/log.h"
|
|
|
|
|
|
|
|
|
|
#include "../util_env.h"
|
|
|
|
|
|
2018-08-07 14:13:57 +02:00
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
2019-08-17 11:46:56 +02:00
|
|
|
|
const static std::vector<std::pair<const char*, Config>> g_appDefaults = {{
|
2019-01-19 17:45:26 +01:00
|
|
|
|
/* Assassin's Creed Syndicate: amdags issues */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\ACS\.exe$)", {{
|
2018-09-09 13:46:57 +02:00
|
|
|
|
{ "dxgi.customVendorId", "10de" },
|
2018-09-12 14:10:49 +02:00
|
|
|
|
}} },
|
2019-03-30 21:05:39 +01:00
|
|
|
|
/* Dissidia Final Fantasy NT Free Edition */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\dffnt\.exe$)", {{
|
2019-03-30 21:05:39 +01:00
|
|
|
|
{ "dxgi.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
2019-01-19 17:45:26 +01:00
|
|
|
|
/* Elite Dangerous: Compiles weird shaders *
|
|
|
|
|
* when running on AMD hardware */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\EliteDangerous64\.exe$)", {{
|
2018-11-06 17:03:01 +01:00
|
|
|
|
{ "dxgi.customVendorId", "10de" },
|
|
|
|
|
}} },
|
2018-10-25 17:49:42 +02:00
|
|
|
|
/* The Vanishing of Ethan Carter Redux */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\EthanCarter-Win64-Shipping\.exe$)", {{
|
2018-10-25 17:49:42 +02:00
|
|
|
|
{ "dxgi.customVendorId", "10de" },
|
2022-07-17 05:50:33 +03:00
|
|
|
|
}} },
|
|
|
|
|
/* EVE Online: Needs this to expose D3D12 *
|
|
|
|
|
* otherwise D3D12 option on launcher is *
|
|
|
|
|
* greyed out */
|
|
|
|
|
{ R"(\\evelauncher\.exe$)", {{
|
|
|
|
|
{ "d3d11.maxFeatureLevel", "12_1" },
|
2018-10-25 17:49:42 +02:00
|
|
|
|
}} },
|
2023-09-03 12:43:23 -07:00
|
|
|
|
/* The Evil Within: Submits command lists *
|
2019-01-19 17:45:26 +01:00
|
|
|
|
* multiple times */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\EvilWithin(Demo)?\.exe$)", {{
|
2018-11-20 10:51:09 +01:00
|
|
|
|
{ "d3d11.dcSingleUseMode", "False" },
|
2022-03-03 23:42:11 +01:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "vi" },
|
2018-10-09 16:29:50 +02:00
|
|
|
|
}} },
|
2023-02-07 05:14:48 -06:00
|
|
|
|
/* Far Cry 2: Set vendor ID to Nvidia to avoid
|
|
|
|
|
* vegetation artifacts on Intel, and set
|
|
|
|
|
* apitrace mode to True to improve perf on all
|
|
|
|
|
* hardware. */
|
|
|
|
|
{ R"(\\(FarCry2|farcry2game)\.exe$)", {{
|
|
|
|
|
{ "d3d9.customVendorId", "10de" },
|
2023-05-26 12:33:36 +02:00
|
|
|
|
{ "d3d9.cachedDynamicBuffers", "True" },
|
2023-02-07 05:14:48 -06:00
|
|
|
|
}} },
|
2019-02-18 18:02:39 +01:00
|
|
|
|
/* Far Cry 3: Assumes clear(0.5) on an UNORM *
|
|
|
|
|
* format to result in 128 on AMD and 127 on *
|
2019-06-12 12:32:30 +02:00
|
|
|
|
* Nvidia. We assume that the Vulkan drivers *
|
2023-12-22 22:06:50 +01:00
|
|
|
|
* match the clear behaviour of D3D11. *
|
|
|
|
|
* Intel needs to match the AMD result */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\(farcry3|fc3_blooddragon)_d3d11\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.hideNvidiaGpu", "False" },
|
2023-12-22 22:06:50 +01:00
|
|
|
|
{ "dxgi.hideIntelGpu", "True" },
|
2019-02-18 18:02:39 +01:00
|
|
|
|
}} },
|
2023-12-22 22:06:50 +01:00
|
|
|
|
/* Far Cry 4 and Primal: Same as Far Cry 3 */
|
|
|
|
|
{ R"(\\(FarCry4|FCPrimal)\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.hideNvidiaGpu", "False" },
|
2023-12-22 22:06:50 +01:00
|
|
|
|
{ "dxgi.hideIntelGpu", "True" },
|
2019-02-18 18:02:39 +01:00
|
|
|
|
}} },
|
2019-01-19 17:45:26 +01:00
|
|
|
|
/* Frostpunk: Renders one frame with D3D9 *
|
|
|
|
|
* after creating the DXGI swap chain */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\Frostpunk\.exe$)", {{
|
2018-08-07 16:58:16 +02:00
|
|
|
|
{ "dxgi.deferSurfaceCreation", "True" },
|
2022-03-26 12:43:04 +01:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "c" },
|
2018-08-07 16:58:16 +02:00
|
|
|
|
}} },
|
2023-04-19 11:31:43 +02:00
|
|
|
|
/* Nioh: Apparently the same as the Atelier games */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\nioh\.exe$)", {{
|
2023-04-19 11:31:43 +02:00
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
2019-03-29 08:48:52 +01:00
|
|
|
|
}} },
|
2019-01-19 17:45:26 +01:00
|
|
|
|
/* Quantum Break: Mever initializes shared *
|
2022-02-14 04:21:09 +01:00
|
|
|
|
* memory in one of its compute shaders. *
|
|
|
|
|
* Also loves using MAP_WRITE on the same *
|
|
|
|
|
* set of resources multiple times per frame. */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\QuantumBreak\.exe$)", {{
|
2018-11-23 16:12:09 +01:00
|
|
|
|
{ "d3d11.zeroInitWorkgroupMemory", "True" },
|
2022-02-14 04:21:09 +01:00
|
|
|
|
{ "d3d11.maxImplicitDiscardSize", "-1" },
|
2018-11-23 16:12:09 +01:00
|
|
|
|
}} },
|
2019-01-19 17:45:26 +01:00
|
|
|
|
/* Anno 2205: Random crashes with state cache */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\anno2205\.exe$)", {{
|
2018-11-24 20:04:21 +01:00
|
|
|
|
{ "dxvk.enableStateCache", "False" },
|
|
|
|
|
}} },
|
2022-03-03 17:33:14 +01:00
|
|
|
|
/* Anno 1800: Poor performance without this */
|
|
|
|
|
{ R"(\\Anno1800\.exe$)", {{
|
|
|
|
|
{ "d3d11.cachedDynamicResources", "c" },
|
|
|
|
|
}} },
|
2019-09-20 16:20:26 +02:00
|
|
|
|
/* Fifa '19+: Binds typed buffer SRV to shader *
|
2019-01-19 17:45:26 +01:00
|
|
|
|
* that expects raw/structured buffer SRV */
|
2019-09-20 00:48:17 +02:00
|
|
|
|
{ R"(\\FIFA(19|[2-9][0-9])(_demo)?\.exe$)", {{
|
2019-01-08 21:01:57 +01:00
|
|
|
|
{ "dxvk.useRawSsbo", "True" },
|
|
|
|
|
}} },
|
2020-06-11 22:05:41 +02:00
|
|
|
|
/* Resident Evil 2/3: Ignore WaW hazards */
|
|
|
|
|
{ R"(\\re(2|3|3demo)\.exe$)", {{
|
2019-02-08 01:38:03 +01:00
|
|
|
|
{ "d3d11.relaxedBarriers", "True" },
|
|
|
|
|
}} },
|
2019-03-11 18:35:39 +01:00
|
|
|
|
/* Devil May Cry 5 */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\DevilMayCry5\.exe$)", {{
|
2019-03-11 18:35:39 +01:00
|
|
|
|
{ "d3d11.relaxedBarriers", "True" },
|
|
|
|
|
}} },
|
2019-01-10 11:57:39 +01:00
|
|
|
|
/* Call of Duty WW2 */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\s2_sp64_ship\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.hideNvidiaGpu", "False" },
|
2019-01-10 11:57:39 +01:00
|
|
|
|
}} },
|
|
|
|
|
/* Need for Speed 2015 */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\NFS16\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.hideNvidiaGpu", "False" },
|
2019-01-10 11:57:39 +01:00
|
|
|
|
}} },
|
2019-01-26 18:38:58 +01:00
|
|
|
|
/* Mass Effect Andromeda */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\MassEffectAndromeda\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.hideNvidiaGpu", "False" },
|
2019-01-26 18:38:58 +01:00
|
|
|
|
}} },
|
2019-05-17 11:40:35 +02:00
|
|
|
|
/* Mirror`s Edge Catalyst: Crashes on AMD */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\MirrorsEdgeCatalyst(Trial)?\.exe$)", {{
|
2019-05-17 11:40:35 +02:00
|
|
|
|
{ "dxgi.customVendorId", "10de" },
|
2019-05-07 22:19:03 +03:00
|
|
|
|
}} },
|
2019-03-14 16:33:35 +01:00
|
|
|
|
/* Star Wars Battlefront (2015) */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\starwarsbattlefront(trial)?\.exe$)", {{
|
2023-06-18 17:36:30 +01:00
|
|
|
|
{ "dxgi.customVendorId", "10de" },
|
2019-03-14 16:33:35 +01:00
|
|
|
|
}} },
|
2021-06-09 03:48:07 +02:00
|
|
|
|
/* NieR Replicant */
|
|
|
|
|
{ R"(\\NieR Replicant ver\.1\.22474487139\.exe)", {{
|
2022-02-14 09:20:41 +01:00
|
|
|
|
{ "dxgi.syncInterval", "1" },
|
|
|
|
|
{ "dxgi.maxFrameRate", "60" },
|
2022-02-28 22:44:10 +01:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "vi" },
|
2021-06-09 03:48:07 +02:00
|
|
|
|
}} },
|
2019-08-10 11:18:26 +02:00
|
|
|
|
/* SteamVR performance test */
|
2019-08-24 18:38:41 +01:00
|
|
|
|
{ R"(\\vr\.exe$)", {{
|
2019-08-10 11:18:26 +02:00
|
|
|
|
{ "d3d11.dcSingleUseMode", "False" },
|
|
|
|
|
}} },
|
2023-11-17 22:02:53 +01:00
|
|
|
|
/* Hitman 2 - requires AGS library */
|
|
|
|
|
{ R"(\\HITMAN2\.exe$)", {{
|
2019-09-26 19:27:19 +02:00
|
|
|
|
{ "dxgi.customVendorId", "10de" },
|
|
|
|
|
}} },
|
2019-10-04 18:35:36 +02:00
|
|
|
|
/* Modern Warfare Remastered */
|
2022-11-04 17:31:06 +03:00
|
|
|
|
{ R"(\\h1(_[ms]p64_ship|-mod)\.exe$)", {{
|
2019-10-04 18:35:36 +02:00
|
|
|
|
{ "dxgi.customVendorId", "10de" },
|
|
|
|
|
}} },
|
2023-05-01 23:33:56 +02:00
|
|
|
|
/* Modern Warfare 2 Campaign Remastered *
|
|
|
|
|
* AMD AGS crash same as above */
|
2023-06-24 12:16:50 +02:00
|
|
|
|
{ R"(\\MW2CR\.exe$)", {{
|
2023-05-01 23:33:56 +02:00
|
|
|
|
{ "dxgi.customVendorId", "10de" },
|
|
|
|
|
}} },
|
2021-08-27 13:10:24 +02:00
|
|
|
|
/* Crysis 3 - slower if it notices AMD card *
|
|
|
|
|
* Apitrace mode helps massively in cpu bound *
|
|
|
|
|
* game parts */
|
2019-12-11 23:01:27 +01:00
|
|
|
|
{ R"(\\Crysis3\.exe$)", {{
|
|
|
|
|
{ "dxgi.customVendorId", "10de" },
|
2022-02-28 22:44:10 +01:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "a" },
|
2019-12-11 23:01:27 +01:00
|
|
|
|
}} },
|
2021-10-18 18:08:43 +02:00
|
|
|
|
/* Crysis 3 Remastered *
|
|
|
|
|
* Apitrace mode helps massively in cpu bound *
|
|
|
|
|
* game parts */
|
|
|
|
|
{ R"(\\Crysis3Remastered\.exe$)", {{
|
2022-02-28 22:44:10 +01:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "a" },
|
2021-10-18 18:08:43 +02:00
|
|
|
|
}} },
|
2020-01-17 18:16:29 +01:00
|
|
|
|
/* Atelier series - games try to render video *
|
|
|
|
|
* with a D3D9 swap chain over the DXGI swap *
|
|
|
|
|
* chain, which breaks D3D11 presentation */
|
|
|
|
|
{ R"(\\Atelier_(Ayesha|Escha_and_Logy|Shallie)(_EN)?\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
2022-03-13 05:38:06 +01:00
|
|
|
|
/* Atelier Firis */
|
|
|
|
|
{ R"(\\A18\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
2020-01-17 18:16:29 +01:00
|
|
|
|
/* Atelier Rorona/Totori/Meruru */
|
|
|
|
|
{ R"(\\A(11R|12V|13V)_x64_Release(_en)?\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Just how many of these games are there? */
|
2023-04-19 11:26:32 +02:00
|
|
|
|
{ R"(\\Atelier_(Lulua|Lydie_and_Suelle|Ryza(_2|_3)?|Sophie_2)\.exe$)", {{
|
2019-12-16 14:40:50 +01:00
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
2021-04-22 15:37:40 +02:00
|
|
|
|
/* ... */
|
|
|
|
|
{ R"(\\Atelier_(Lydie_and_Suelle|Firis|Sophie)_DX\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
2020-08-02 20:36:15 -04:00
|
|
|
|
/* Fairy Tail */
|
|
|
|
|
{ R"(\\FAIRY_TAIL\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
2021-04-26 09:23:12 -07:00
|
|
|
|
/* Nights of Azure */
|
|
|
|
|
{ R"(\\CNN\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
2019-12-16 17:13:37 -08:00
|
|
|
|
/* Star Wars Battlefront II: amdags issues */
|
|
|
|
|
{ R"(\\starwarsbattlefrontii\.exe$)", {{
|
|
|
|
|
{ "dxgi.customVendorId", "10de" },
|
|
|
|
|
}} },
|
2021-01-16 15:23:52 +01:00
|
|
|
|
/* F1 games - do not synchronize TGSM access *
|
2020-02-07 23:27:11 +01:00
|
|
|
|
* in a compute shader, causing artifacts */
|
2021-01-16 15:23:52 +01:00
|
|
|
|
{ R"(\\F1_20(1[89]|[2-9][0-9])\.exe$)", {{
|
2022-09-09 13:59:58 +02:00
|
|
|
|
{ "d3d11.forceVolatileTgsmAccess", "True" },
|
2020-02-07 23:27:11 +01:00
|
|
|
|
}} },
|
2020-08-12 23:39:53 +02:00
|
|
|
|
/* Darksiders Warmastered - apparently reads *
|
|
|
|
|
* from write-only mapped buffers */
|
|
|
|
|
{ R"(\\darksiders1\.exe$)", {{
|
2022-02-28 22:44:10 +01:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "a" },
|
2020-08-12 23:39:53 +02:00
|
|
|
|
}} },
|
2020-08-13 18:52:45 +02:00
|
|
|
|
/* Monster Hunter World */
|
|
|
|
|
{ R"(\\MonsterHunterWorld\.exe$)", {{
|
2022-02-28 22:44:10 +01:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "a" },
|
2021-01-28 20:09:10 +01:00
|
|
|
|
}} },
|
2021-04-16 11:49:43 +10:00
|
|
|
|
/* Kingdome Come: Deliverance */
|
|
|
|
|
{ R"(\\KingdomCome\.exe$)", {{
|
2022-02-28 22:44:10 +01:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "a" },
|
2021-04-16 11:49:43 +10:00
|
|
|
|
}} },
|
2021-08-14 02:24:14 -07:00
|
|
|
|
/* Homefront: The Revolution */
|
|
|
|
|
{ R"(\\Homefront2_Release\.exe$)", {{
|
2022-02-28 22:44:10 +01:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "a" },
|
2021-08-14 02:24:14 -07:00
|
|
|
|
}} },
|
2021-04-16 11:49:43 +10:00
|
|
|
|
/* Sniper Ghost Warrior Contracts */
|
|
|
|
|
{ R"(\\SGWContracts\.exe$)", {{
|
2022-02-28 22:44:10 +01:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "a" },
|
2021-04-16 11:49:43 +10:00
|
|
|
|
}} },
|
2022-04-08 21:54:18 +02:00
|
|
|
|
/* Armored Warfare */
|
|
|
|
|
{ R"(\\armoredwarfare\.exe$)", {{
|
|
|
|
|
{ "d3d11.cachedDynamicResources", "c" },
|
|
|
|
|
}} },
|
2021-01-28 20:09:10 +01:00
|
|
|
|
/* Shadow of the Tomb Raider - invariant *
|
|
|
|
|
* position breaks character rendering on NV */
|
|
|
|
|
{ R"(\\SOTTR\.exe$)", {{
|
|
|
|
|
{ "d3d11.invariantPosition", "False" },
|
2021-01-28 20:32:38 +01:00
|
|
|
|
{ "d3d11.floatControls", "False" },
|
2020-08-13 18:52:45 +02:00
|
|
|
|
}} },
|
2021-02-06 07:48:52 +00:00
|
|
|
|
/* Nioh 2 */
|
|
|
|
|
{ R"(\\nioh2\.exe$)", {{
|
|
|
|
|
{ "dxgi.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
2021-02-14 02:12:15 +01:00
|
|
|
|
/* DIRT 5 - uses amd_ags_x64.dll when it *
|
|
|
|
|
* detects an AMD GPU */
|
|
|
|
|
{ R"(\\DIRT5\.exe$)", {{
|
|
|
|
|
{ "dxgi.customVendorId", "10de" },
|
|
|
|
|
}} },
|
2021-05-11 23:35:33 +01:00
|
|
|
|
/* Crazy Machines 3 - crashes on long device *
|
|
|
|
|
* descriptions */
|
|
|
|
|
{ R"(\\cm3\.exe$)", {{
|
|
|
|
|
{ "dxgi.customDeviceDesc", "DXVK Adapter" },
|
|
|
|
|
}} },
|
2021-07-02 04:42:02 +02:00
|
|
|
|
/* World of Final Fantasy: Broken and useless *
|
|
|
|
|
* use of 4x MSAA throughout the renderer */
|
|
|
|
|
{ R"(\\WOFF\.exe$)", {{
|
|
|
|
|
{ "d3d11.disableMsaa", "True" },
|
2022-07-18 19:02:47 +02:00
|
|
|
|
}} },
|
|
|
|
|
/* Mary Skelter 2 - Broken MSAA */
|
|
|
|
|
{ R"(\\MarySkelter2\.exe$)", {{
|
|
|
|
|
{ "d3d11.disableMsaa", "True" },
|
2021-07-02 04:42:02 +02:00
|
|
|
|
}} },
|
2022-08-10 16:39:58 +02:00
|
|
|
|
/* Final Fantasy XIV: Uses lots of HVV and *
|
|
|
|
|
* also reads some uncached memory. */
|
2021-11-02 00:17:35 +01:00
|
|
|
|
{ R"(\\ffxiv_dx11\.exe$)", {{
|
2022-02-28 23:33:01 +01:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "vi" },
|
2021-11-02 00:17:35 +01:00
|
|
|
|
}} },
|
2022-09-19 15:43:45 +02:00
|
|
|
|
/* Final Fantasy XV: VXAO does thousands of *
|
|
|
|
|
* draw calls with the same UAV bound */
|
|
|
|
|
{ R"(\\ffxv_s\.exe$)", {{
|
|
|
|
|
{ "d3d11.ignoreGraphicsBarriers", "True" },
|
|
|
|
|
}} },
|
2022-01-14 15:21:49 +01:00
|
|
|
|
/* God of War - relies on NVAPI/AMDAGS for *
|
|
|
|
|
* barrier stuff, needs nvapi for DLSS */
|
2022-01-14 13:16:06 +01:00
|
|
|
|
{ R"(\\GoW\.exe$)", {{
|
|
|
|
|
{ "d3d11.ignoreGraphicsBarriers", "True" },
|
|
|
|
|
{ "d3d11.relaxedBarriers", "True" },
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.hideNvidiaGpu", "False" },
|
2022-03-24 03:01:29 +01:00
|
|
|
|
{ "dxgi.maxFrameLatency", "1" },
|
2022-01-14 13:16:06 +01:00
|
|
|
|
}} },
|
2022-02-11 18:15:46 +01:00
|
|
|
|
/* AoE 2 DE - runs poorly for some users */
|
|
|
|
|
{ R"(\\AoE2DE_s\.exe$)", {{
|
2022-02-28 22:44:10 +01:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "a" },
|
2022-02-11 18:15:46 +01:00
|
|
|
|
}} },
|
2022-02-22 05:30:19 +01:00
|
|
|
|
/* Total War: Warhammer III */
|
|
|
|
|
{ R"(\\Warhammer3\.exe$)", {{
|
|
|
|
|
{ "d3d11.maxDynamicImageBufferSize", "4096" },
|
|
|
|
|
}} },
|
2022-03-19 20:11:47 +01:00
|
|
|
|
/* Assassin's Creed 3 and 4 */
|
|
|
|
|
{ R"(\\ac(3|4bf)[sm]p\.exe$)", {{
|
|
|
|
|
{ "d3d11.cachedDynamicResources", "a" },
|
|
|
|
|
}} },
|
2022-03-25 16:36:17 +01:00
|
|
|
|
/* Stranger of Paradise - FF Origin */
|
|
|
|
|
{ R"(\\SOPFFO\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
2022-05-18 20:38:18 -05:00
|
|
|
|
/* Small Radios Big Televisions */
|
|
|
|
|
}} },
|
|
|
|
|
{ R"(\\SRBT\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
2022-03-25 16:36:17 +01:00
|
|
|
|
}} },
|
2022-06-25 09:17:42 +00:00
|
|
|
|
/* A Way Out: fix for stuttering and low fps */
|
|
|
|
|
{ R"(\\AWayOut(_friend)?\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.maxFrameLatency", "1" },
|
2022-06-25 09:17:42 +00:00
|
|
|
|
}} },
|
2022-07-02 16:50:12 +02:00
|
|
|
|
/* Garden Warfare 2
|
|
|
|
|
Won't start on amd Id without atiadlxx */
|
2023-09-03 12:42:56 -07:00
|
|
|
|
{ R"(\\GW2\.Main_Win64_Retail\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.customVendorId", "10de" },
|
2022-07-02 16:50:12 +02:00
|
|
|
|
}} },
|
2022-07-09 15:51:04 +02:00
|
|
|
|
/* DayZ */
|
|
|
|
|
{ R"(\\DayZ_x64\.exe$)", {{
|
|
|
|
|
{ "d3d11.cachedDynamicResources", "cr" },
|
|
|
|
|
}} },
|
2022-07-23 21:21:22 +02:00
|
|
|
|
/* Stray - writes to the same UAV every draw, *
|
|
|
|
|
* presumably for culling, which doesn't play *
|
|
|
|
|
* nicely with D3D11 without vendor libraries */
|
|
|
|
|
{ R"(\\Stray-Win64-Shipping\.exe$)", {{
|
|
|
|
|
{ "d3d11.ignoreGraphicsBarriers", "True" },
|
|
|
|
|
}} },
|
2022-08-25 22:52:01 +02:00
|
|
|
|
/* Metal Gear Solid V: Ground Zeroes *
|
|
|
|
|
* Texture quality can break at high vram */
|
|
|
|
|
{ R"(\\MgsGroundZeroes\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.maxDeviceMemory", "4095" },
|
2022-08-25 22:52:01 +02:00
|
|
|
|
}} },
|
2022-11-06 10:08:53 +01:00
|
|
|
|
/* Shantae and the Pirate's Curse *
|
|
|
|
|
* Game speeds up above 60 fps */
|
|
|
|
|
{ R"(\\ShantaeCurse\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.maxFrameRate", "60" },
|
2022-11-06 10:08:53 +01:00
|
|
|
|
}} },
|
|
|
|
|
/* Mighty Switch Force! Collection *
|
|
|
|
|
* Games speed up above 60 fps */
|
|
|
|
|
{ R"(\\MSFC\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.maxFrameRate", "60" },
|
2022-11-06 10:08:53 +01:00
|
|
|
|
}} },
|
2022-11-15 15:49:45 +01:00
|
|
|
|
/* Cardfight!! Vanguard Dear Days: *
|
|
|
|
|
* Submits command lists multiple times */
|
|
|
|
|
{ R"(\\VG2\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "d3d11.dcSingleUseMode", "False" },
|
2022-11-15 15:49:45 +01:00
|
|
|
|
}} },
|
2022-11-18 22:33:04 +01:00
|
|
|
|
/* Battlefield: Bad Company 2 *
|
|
|
|
|
* Gets rid of black flickering */
|
|
|
|
|
{ R"(\\BFBC2Game\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "d3d11.floatControls", "False" },
|
2022-11-18 22:33:04 +01:00
|
|
|
|
}} },
|
2022-11-21 17:16:36 +01:00
|
|
|
|
/* Sonic Frontiers - flickering shadows and *
|
|
|
|
|
* vegetation when GPU-bound */
|
|
|
|
|
{ R"(\\SonicFrontiers\.exe$)", {{
|
|
|
|
|
{ "dxgi.maxFrameLatency", "1" },
|
|
|
|
|
}} },
|
2022-12-04 22:35:45 +01:00
|
|
|
|
/* TRAHA Global *
|
|
|
|
|
* Shadow issues when it sees AMD/Nvidia */
|
|
|
|
|
{ R"(\\RapaNui-Win64-Shipping\.exe$)", {{
|
|
|
|
|
{ "dxgi.customVendorId", "8086" },
|
|
|
|
|
}} },
|
2023-03-11 14:45:40 +01:00
|
|
|
|
/* SpellForce 3 Reforced & expansions *
|
|
|
|
|
* Greatly improves CPU bound performance */
|
|
|
|
|
{ R"(\\SF3ClientFinal\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "d3d11.cachedDynamicResources", "v" },
|
2023-03-11 14:45:40 +01:00
|
|
|
|
}} },
|
2023-03-24 17:17:48 +08:00
|
|
|
|
/* Tom Clancy's Ghost Recon Breakpoint */
|
|
|
|
|
{ R"(\\GRB\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.hideNvidiaGpu", "False" },
|
2023-03-24 17:17:48 +08:00
|
|
|
|
}} },
|
2023-03-25 22:39:21 +01:00
|
|
|
|
/* GTA V performance issues */
|
|
|
|
|
{ R"(\\GTA5\.exe$)", {{
|
|
|
|
|
{ "d3d11.cachedDynamicResources", "vi" },
|
|
|
|
|
}} },
|
2023-04-05 14:59:19 +02:00
|
|
|
|
/* Crash Bandicoot N. Sane Trilogy *
|
|
|
|
|
* Work around some vsync funkiness */
|
|
|
|
|
{ R"(\\CrashBandicootNSaneTrilogy\.exe$)", {{
|
|
|
|
|
{ "dxgi.syncInterval", "1" },
|
|
|
|
|
}} },
|
2023-05-21 15:40:57 +02:00
|
|
|
|
/* SnowRunner */
|
|
|
|
|
{ R"(\\SnowRunner\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "d3d11.dcSingleUseMode", "False" },
|
2023-05-21 15:40:57 +02:00
|
|
|
|
}} },
|
2023-06-01 17:22:07 -07:00
|
|
|
|
/* Rockstar Games Launcher */
|
|
|
|
|
{ R"(\\Rockstar Games\\Launcher\\Launcher\.exe$)", {{
|
|
|
|
|
{ "dxvk.maxChunkSize", "1" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Rockstar Social Club */
|
|
|
|
|
{ R"(\\Rockstar Games\\Social Club\\SocialClubHelper\.exe$)", {{
|
|
|
|
|
{ "dxvk.maxChunkSize", "1" },
|
|
|
|
|
}} },
|
2023-06-15 19:23:24 +01:00
|
|
|
|
/* EA Desktop App */
|
2023-06-15 21:32:03 +01:00
|
|
|
|
{ R"(\\EADesktop\.exe$)", {{
|
|
|
|
|
{ "dxvk.maxChunkSize", "1" },
|
|
|
|
|
}} },
|
|
|
|
|
/* GOG Galaxy */
|
|
|
|
|
{ R"(\\GalaxyClient\.exe$)", {{
|
2023-06-15 19:23:24 +01:00
|
|
|
|
{ "dxvk.maxChunkSize", "1" },
|
|
|
|
|
}} },
|
2023-06-06 21:19:14 +02:00
|
|
|
|
/* Fallout 76
|
|
|
|
|
* Game tries to be too "smart" and changes sync
|
|
|
|
|
* interval based on performance (in fullscreen)
|
|
|
|
|
* or tries to match (or ratio below) 60fps
|
|
|
|
|
* (in windowed).
|
|
|
|
|
*
|
|
|
|
|
* Ends up getting in a loop where it will switch
|
|
|
|
|
* and start stuttering, or get stuck at targeting
|
|
|
|
|
* 30Hz in fullscreen.
|
|
|
|
|
* Windowed mode being locked to 60fps as well is
|
|
|
|
|
* pretty suboptimal...
|
|
|
|
|
*/
|
|
|
|
|
{ R"(\\Fallout76\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.syncInterval", "1" },
|
2023-06-06 21:19:14 +02:00
|
|
|
|
}} },
|
2023-06-15 01:21:07 +02:00
|
|
|
|
/* Blizzard Entertainment Battle.net */
|
2023-09-03 12:42:56 -07:00
|
|
|
|
{ R"(\\Battle\.net\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxvk.maxChunkSize", "1" },
|
2023-06-15 01:21:07 +02:00
|
|
|
|
}} },
|
2023-06-25 14:04:53 +01:00
|
|
|
|
/* Bladestorm Nightmare *
|
|
|
|
|
* Game speed increases when above 60 fps in *
|
|
|
|
|
* the tavern area */
|
|
|
|
|
{ R"(\\BLADESTORM Nightmare\\Launch_(EA|JP)\.exe$)", {{
|
|
|
|
|
{ "dxgi.maxFrameRate", "60" },
|
|
|
|
|
}} },
|
2023-07-17 15:00:55 +02:00
|
|
|
|
/* Ghost Recon Wildlands */
|
|
|
|
|
{ R"(\\GRW\.exe$)", {{
|
|
|
|
|
{ "d3d11.dcSingleUseMode", "False" },
|
|
|
|
|
}} },
|
2023-07-23 18:50:04 +02:00
|
|
|
|
/* Vindictus d3d11 CPU bound perf */
|
|
|
|
|
{ R"(\\Vindictus(_x64)?\.exe$)", {{
|
|
|
|
|
{ "d3d11.cachedDynamicResources", "cr" },
|
|
|
|
|
}} },
|
2023-08-31 17:31:21 +02:00
|
|
|
|
/* Riders Republic - Statically linked AMDAGS */
|
|
|
|
|
{ R"(\\RidersRepublic(_BE)?\.exe$)", {{
|
|
|
|
|
{ "dxgi.hideAmdGpu", "True" },
|
|
|
|
|
}} },
|
2023-10-10 16:15:09 +02:00
|
|
|
|
/* HoloCure - Save the Fans!
|
|
|
|
|
Same as Cyberpunk 2077 */
|
|
|
|
|
{ R"(\\HoloCure\.exe$)", {{
|
|
|
|
|
{ "dxgi.useMonitorFallback", "True" },
|
|
|
|
|
}} },
|
2019-12-16 03:28:01 +00:00
|
|
|
|
|
|
|
|
|
/**********************************************/
|
|
|
|
|
/* D3D9 GAMES */
|
|
|
|
|
/**********************************************/
|
|
|
|
|
|
|
|
|
|
/* A Hat in Time */
|
|
|
|
|
{ R"(\\HatinTimeGame\.exe$)", {{
|
2020-01-28 18:27:25 +01:00
|
|
|
|
{ "d3d9.strictPow", "False" },
|
2019-12-16 03:28:01 +00:00
|
|
|
|
{ "d3d9.lenientClear", "True" },
|
|
|
|
|
}} },
|
2020-07-25 02:31:46 +02:00
|
|
|
|
/* Anarchy Online */
|
|
|
|
|
{ R"(\\anarchyonline\.exe$)", {{
|
|
|
|
|
{ "d3d9.memoryTrackTest", "True" },
|
|
|
|
|
}} },
|
2020-06-28 16:07:54 +02:00
|
|
|
|
/* Borderlands 2 and The Pre Sequel! */
|
|
|
|
|
{ R"(\\Borderlands(2|PreSequel)\.exe$)", {{
|
2019-12-16 03:28:01 +00:00
|
|
|
|
{ "d3d9.lenientClear", "True" },
|
2020-06-28 16:07:54 +02:00
|
|
|
|
{ "d3d9.supportDFFormats", "False" },
|
2019-12-16 03:28:01 +00:00
|
|
|
|
}} },
|
|
|
|
|
/* Borderlands */
|
|
|
|
|
{ R"(\\Borderlands\.exe$)", {{
|
|
|
|
|
{ "d3d9.lenientClear", "True" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Gothic 3 */
|
2020-01-25 12:04:24 +01:00
|
|
|
|
{ R"(\\Gothic(3|3Final| III Forsaken Gods)\.exe$)", {{
|
2020-01-24 13:45:13 +01:00
|
|
|
|
{ "d3d9.supportDFFormats", "False" },
|
2019-12-16 03:28:01 +00:00
|
|
|
|
}} },
|
|
|
|
|
/* Sonic Adventure 2 */
|
|
|
|
|
{ R"(\\Sonic Adventure 2\\(launcher|sonic2app)\.exe$)", {{
|
2022-06-11 01:02:25 +02:00
|
|
|
|
{ "d3d9.floatEmulation", "Strict" },
|
2022-09-30 21:03:34 +02:00
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
2019-12-16 03:28:01 +00:00
|
|
|
|
}} },
|
|
|
|
|
/* The Sims 2,
|
|
|
|
|
Body Shop,
|
|
|
|
|
The Sims Life Stories,
|
|
|
|
|
The Sims Pet Stories,
|
|
|
|
|
and The Sims Castaway Stories */
|
|
|
|
|
{ R"(\\(Sims2.*|TS2BodyShop|SimsLS|SimsPS|SimsCS)\.exe$)", {{
|
|
|
|
|
{ "d3d9.customVendorId", "10de" },
|
|
|
|
|
{ "d3d9.customDeviceId", "0091" },
|
|
|
|
|
{ "d3d9.customDeviceDesc", "GeForce 7800 GTX" },
|
|
|
|
|
{ "d3d9.disableA8RT", "True" },
|
|
|
|
|
{ "d3d9.supportX4R4G4B4", "False" },
|
|
|
|
|
{ "d3d9.maxAvailableMemory", "2048" },
|
|
|
|
|
{ "d3d9.memoryTrackTest", "True" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Dead Space uses the a NULL render target instead
|
2023-09-03 12:43:23 -07:00
|
|
|
|
of a 1x1 one if DF24 is NOT supported
|
2022-07-02 21:59:55 +01:00
|
|
|
|
Mouse and physics issues above 60 FPS
|
|
|
|
|
Built-in Vsync Locks the game to 30 FPS */
|
2019-12-16 03:28:01 +00:00
|
|
|
|
{ R"(\\Dead Space\.exe$)", {{
|
|
|
|
|
{ "d3d9.supportDFFormats", "False" },
|
2022-07-02 21:59:55 +01:00
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
|
|
|
|
{ "d3d9.presentInterval", "1" },
|
2019-12-16 03:28:01 +00:00
|
|
|
|
}} },
|
|
|
|
|
/* Halo CE/HaloPC */
|
|
|
|
|
{ R"(\\halo(ce)?\.exe$)", {{
|
|
|
|
|
// Game enables minor decal layering fixes
|
|
|
|
|
// specifically when it detects AMD.
|
|
|
|
|
// Avoids chip being detected as unsupported
|
|
|
|
|
// when on intel. Avoids possible path towards
|
|
|
|
|
// invalid texture addressing methods.
|
|
|
|
|
{ "d3d9.customVendorId", "1002" },
|
|
|
|
|
// Avoids card not recognized error.
|
|
|
|
|
// Keeps game's rendering methods consistent
|
|
|
|
|
// for optimal compatibility.
|
|
|
|
|
{ "d3d9.customDeviceId", "4172" },
|
2020-01-01 20:58:42 +00:00
|
|
|
|
// The game uses incorrect sampler types in
|
|
|
|
|
// the shaders for glass rendering which
|
|
|
|
|
// breaks it on native + us if we don't
|
|
|
|
|
// spec-constantly chose the sampler type
|
|
|
|
|
// automagically.
|
|
|
|
|
{ "d3d9.forceSamplerTypeSpecConstants", "True" },
|
2019-12-16 03:28:01 +00:00
|
|
|
|
}} },
|
|
|
|
|
/* Counter Strike: Global Offensive
|
|
|
|
|
Needs NVAPI to avoid a forced AO + Smoke
|
|
|
|
|
exploit so we must force AMD vendor ID. */
|
|
|
|
|
{ R"(\\csgo\.exe$)", {{
|
|
|
|
|
{ "d3d9.customVendorId", "1002" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Vampire - The Masquerade Bloodlines */
|
|
|
|
|
{ R"(\\vampire\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
{ "d3d9.memoryTrackTest", "True" },
|
|
|
|
|
{ "d3d9.maxAvailableMemory", "1024" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Senran Kagura Shinovi Versus */
|
|
|
|
|
{ R"(\\SKShinoviVersus\.exe$)", {{
|
|
|
|
|
{ "d3d9.forceAspectRatio", "16:9" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Metal Slug X */
|
|
|
|
|
{ R"(\\mslugx\.exe$)", {{
|
|
|
|
|
{ "d3d9.supportD32", "False" },
|
|
|
|
|
}} },
|
2020-01-22 16:20:42 +00:00
|
|
|
|
/* Skyrim (NVAPI) */
|
|
|
|
|
{ R"(\\TESV\.exe$)", {{
|
|
|
|
|
{ "d3d9.customVendorId", "1002" },
|
|
|
|
|
}} },
|
2020-02-13 20:00:22 -05:00
|
|
|
|
/* Hyperdimension Neptunia U: Action Unleashed */
|
|
|
|
|
{ R"(\\Neptunia\.exe$)", {{
|
|
|
|
|
{ "d3d9.forceAspectRatio", "16:9" },
|
|
|
|
|
}} },
|
2020-03-28 11:52:05 +01:00
|
|
|
|
/* GTA IV (NVAPI) */
|
2021-07-20 20:07:06 +02:00
|
|
|
|
/* Also thinks we're always on Intel *
|
2022-09-17 17:30:27 +02:00
|
|
|
|
* and will report/use bad amounts of VRAM.
|
|
|
|
|
* Disabling support for DF texture formats
|
|
|
|
|
* makes the game use a better looking render
|
2023-03-27 19:22:35 +02:00
|
|
|
|
* path for mirrors.
|
|
|
|
|
* Also runs into issues after alt-tabbing. */
|
2022-09-19 16:08:48 +02:00
|
|
|
|
{ R"(\\(GTAIV|EFLC)\.exe$)", {{
|
2020-03-28 11:52:05 +01:00
|
|
|
|
{ "d3d9.customVendorId", "1002" },
|
2021-07-20 20:07:06 +02:00
|
|
|
|
{ "dxgi.emulateUMA", "True" },
|
2022-09-17 17:30:27 +02:00
|
|
|
|
{ "d3d9.supportDFFormats", "False" },
|
2023-06-10 01:18:05 +02:00
|
|
|
|
{ "d3d9.deviceLostOnFocusLoss", "True" },
|
2020-03-28 11:52:05 +01:00
|
|
|
|
}} },
|
2020-04-08 23:23:21 +01:00
|
|
|
|
/* Battlefield 2 (bad z-pass) */
|
|
|
|
|
{ R"(\\BF2\.exe$)", {{
|
|
|
|
|
{ "d3d9.longMad", "True" },
|
|
|
|
|
}} },
|
2020-06-05 02:36:17 +01:00
|
|
|
|
/* SpellForce 2 Series */
|
|
|
|
|
{ R"(\\SpellForce2.*\.exe$)", {{
|
2020-05-27 17:14:12 +01:00
|
|
|
|
{ "d3d9.forceSamplerTypeSpecConstants", "True" },
|
|
|
|
|
}} },
|
2023-05-22 01:43:55 +02:00
|
|
|
|
/* Tomb Raider: Legend, Anniversary, Underworld *
|
|
|
|
|
* Read from a buffer created with: *
|
|
|
|
|
* D3DPOOL_DEFAULT, *
|
|
|
|
|
* D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY buffer */
|
|
|
|
|
{ R"(\\(trl|tra|tru)\.exe$)", {{
|
2023-05-26 12:33:36 +02:00
|
|
|
|
{ "d3d9.cachedDynamicBuffers", "True" },
|
2023-05-23 23:27:43 +02:00
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
2020-12-14 17:40:39 +01:00
|
|
|
|
}} },
|
2020-12-24 13:41:42 +01:00
|
|
|
|
/* Everquest */
|
|
|
|
|
{ R"(\\eqgame\.exe$)", {{
|
2023-05-26 12:33:36 +02:00
|
|
|
|
{ "d3d9.cachedDynamicBuffers", "True" },
|
2020-12-24 13:41:42 +01:00
|
|
|
|
}} },
|
2021-01-30 04:36:26 +00:00
|
|
|
|
/* Dark Messiah of Might & Magic */
|
|
|
|
|
{ R"(\\mm\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
{ "d3d9.memoryTrackTest", "True" },
|
|
|
|
|
}} },
|
2021-02-25 15:09:00 +00:00
|
|
|
|
/* Mafia 2 */
|
|
|
|
|
{ R"(\\mafia2\.exe$)", {{
|
|
|
|
|
{ "d3d9.customVendorId", "10de" },
|
|
|
|
|
{ "d3d9.customDeviceId", "0402" },
|
|
|
|
|
}} },
|
2021-02-27 20:31:13 +00:00
|
|
|
|
/* Warhammer: Online */
|
2023-11-09 12:16:55 +02:00
|
|
|
|
{ R"(\\(WAR(-64)?|WARTEST(-64)?)\.exe$)", {{
|
2021-02-28 09:54:33 +00:00
|
|
|
|
{ "d3d9.customVendorId", "1002" },
|
2021-02-27 20:31:13 +00:00
|
|
|
|
}} },
|
2021-04-04 13:32:59 +02:00
|
|
|
|
/* Dragon Nest */
|
|
|
|
|
{ R"(\\DragonNest_x64\.exe$)", {{
|
|
|
|
|
{ "d3d9.memoryTrackTest ", "True" },
|
|
|
|
|
}} },
|
2021-04-22 12:54:26 +02:00
|
|
|
|
/* Dal Segno */
|
|
|
|
|
{ R"(\\DST\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
2021-04-30 18:49:39 +01:00
|
|
|
|
/* Kohan II */
|
|
|
|
|
{ R"(\\k2\.exe$)", {{
|
|
|
|
|
{ "d3d9.memoryTrackTest", "True" },
|
|
|
|
|
}} },
|
2021-06-10 01:38:58 -06:00
|
|
|
|
/* Ninja Gaiden Sigma 1/2 */
|
|
|
|
|
{ R"(\\NINJA GAIDEN SIGMA(2)?\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
2021-06-15 11:49:03 +02:00
|
|
|
|
/* Demon Stone breaks at frame rates > 60fps */
|
|
|
|
|
{ R"(\\Demonstone\.exe$)", {{
|
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
|
|
|
|
}} },
|
2021-06-19 18:26:56 +02:00
|
|
|
|
/* Far Cry 1 has worse water rendering when it detects AMD GPUs */
|
|
|
|
|
{ R"(\\FarCry\.exe$)", {{
|
|
|
|
|
{ "d3d9.customVendorId", "10de" },
|
|
|
|
|
}} },
|
2021-06-28 18:30:03 +02:00
|
|
|
|
/* Earth Defense Force 5 */
|
|
|
|
|
{ R"(\\EDF5\.exe$)", {{
|
|
|
|
|
{ "dxgi.tearFree", "False" },
|
|
|
|
|
{ "dxgi.syncInterval", "1" },
|
|
|
|
|
}} },
|
2021-08-24 17:22:38 +02:00
|
|
|
|
/* Sine Mora EX */
|
|
|
|
|
{ R"(\\SineMoraEX\.exe$)", {{
|
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
|
|
|
|
}} },
|
2021-11-12 15:26:22 +01:00
|
|
|
|
/* Red Orchestra 2 */
|
|
|
|
|
{ R"(\\ROGame\.exe$)", {{
|
|
|
|
|
{ "d3d9.floatEmulation", "Strict" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Dark Souls II */
|
|
|
|
|
{ R"(\\DarkSoulsII\.exe$)", {{
|
|
|
|
|
{ "d3d9.floatEmulation", "Strict" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Dogfight 1942 */
|
|
|
|
|
{ R"(\\Dogfight1942\.exe$)", {{
|
|
|
|
|
{ "d3d9.floatEmulation", "Strict" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Bayonetta */
|
|
|
|
|
{ R"(\\Bayonetta\.exe$)", {{
|
|
|
|
|
{ "d3d9.floatEmulation", "Strict" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Rayman Origins */
|
|
|
|
|
{ R"(\\Rayman Origins\.exe$)", {{
|
|
|
|
|
{ "d3d9.floatEmulation", "Strict" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Guilty Gear Xrd -Relevator- */
|
|
|
|
|
{ R"(\\GuiltyGearXrd\.exe$)", {{
|
|
|
|
|
{ "d3d9.floatEmulation", "Strict" },
|
|
|
|
|
}} },
|
|
|
|
|
/* Richard Burns Rally */
|
|
|
|
|
{ R"(\\RichardBurnsRally_SSE\.exe$)", {{
|
|
|
|
|
{ "d3d9.floatEmulation", "Strict" },
|
|
|
|
|
}} },
|
2021-12-09 13:23:50 -05:00
|
|
|
|
/* BlazBlue Centralfiction */
|
|
|
|
|
{ R"(\\BBCF\.exe$)", {{
|
|
|
|
|
{ "d3d9.floatEmulation", "Strict" },
|
2023-05-16 18:43:44 +02:00
|
|
|
|
{ "d3d9.textureMemory", "0" },
|
2021-12-09 13:23:50 -05:00
|
|
|
|
}} },
|
2022-03-28 18:38:30 +02:00
|
|
|
|
/* Limbo */
|
|
|
|
|
{ R"(\\limbo\.exe$)", {{
|
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
|
|
|
|
}} },
|
2022-10-03 14:51:20 +02:00
|
|
|
|
/* Escape from Tarkov launcher
|
|
|
|
|
Same issue as Warhammer: RoR above */
|
|
|
|
|
{ R"(\\BsgLauncher\.exe$)", {{
|
|
|
|
|
{ "d3d9.shaderModel", "1" },
|
|
|
|
|
}} },
|
2022-04-06 00:07:31 +02:00
|
|
|
|
/* Star Wars The Force Unleashed 2 *
|
|
|
|
|
* Black particles because it tries to bind *
|
|
|
|
|
* a 2D texture for a shader that *
|
|
|
|
|
* declares a 3d texture. */
|
|
|
|
|
{ R"(\\SWTFU2\.exe$)", {{
|
|
|
|
|
{ "d3d9.forceSamplerTypeSpecConstants", "True" },
|
|
|
|
|
}} },
|
2022-05-31 16:17:31 +03:00
|
|
|
|
/* Scrapland (Remastered) */
|
|
|
|
|
{ R"(\\Scrap\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
2022-04-18 18:23:31 +03:00
|
|
|
|
/* Majesty 2 (Collection) *
|
|
|
|
|
* Crashes on UMA without a memory limit, *
|
|
|
|
|
* since the game(s) will allocate all *
|
|
|
|
|
* available VRAM on startup. */
|
|
|
|
|
{ R"(\\Majesty2\.exe$)", {{
|
|
|
|
|
{ "d3d9.memoryTrackTest", "True" },
|
|
|
|
|
{ "d3d9.maxAvailableMemory", "2048" },
|
|
|
|
|
}} },
|
2023-09-03 12:43:23 -07:00
|
|
|
|
/* Myst V End of Ages
|
2022-05-31 20:44:11 +02:00
|
|
|
|
Game has white textures on amd radv.
|
|
|
|
|
Expects Nvidia, Intel or ATI VendorId.
|
|
|
|
|
"Radeon" in gpu description also works */
|
|
|
|
|
{ R"(\\eoa\.exe$)", {{
|
|
|
|
|
{ "d3d9.customVendorId", "10de" },
|
|
|
|
|
}} },
|
2022-06-14 00:31:50 +02:00
|
|
|
|
/* Supreme Commander & Forged Alliance Forever */
|
|
|
|
|
{ R"(\\(SupremeCommander|ForgedAlliance)\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "d3d9.floatEmulation", "Strict" },
|
2022-06-12 20:21:27 +02:00
|
|
|
|
}} },
|
2022-06-13 17:04:41 +02:00
|
|
|
|
/* Star Wars The Old Republic */
|
|
|
|
|
{ R"(\\swtor\.exe$)", {{
|
|
|
|
|
{ "d3d9.forceSamplerTypeSpecConstants", "True" },
|
|
|
|
|
}} },
|
2023-09-03 12:43:23 -07:00
|
|
|
|
/* Bionic Commando
|
2022-07-02 16:51:04 +02:00
|
|
|
|
Physics break at high fps */
|
|
|
|
|
{ R"(\\bionic_commando\.exe$)", {{
|
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
|
|
|
|
}} },
|
2022-07-22 17:25:16 +02:00
|
|
|
|
/* Need For Speed 3 modern patch */
|
|
|
|
|
{ R"(\\nfs3\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "d3d9.enableDialogMode", "True" },
|
2022-07-22 17:25:16 +02:00
|
|
|
|
}} },
|
2022-08-16 17:21:42 +02:00
|
|
|
|
/* Beyond Good And Evil *
|
|
|
|
|
* UI breaks at high fps */
|
|
|
|
|
{ R"(\\BGE\.exe$)", {{
|
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
|
|
|
|
}} },
|
2022-08-18 12:13:49 +02:00
|
|
|
|
/* King Of Fighters XIII *
|
|
|
|
|
* In-game speed increases on high FPS */
|
2023-06-14 01:18:30 +03:00
|
|
|
|
{ R"(\\kof(xiii|13_win32_Release)\.exe$)", {{
|
2022-08-18 12:13:49 +02:00
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
|
|
|
|
}} },
|
2022-07-25 15:33:42 +02:00
|
|
|
|
/* YS Origin *
|
|
|
|
|
* Helps very bad frametimes in some areas */
|
|
|
|
|
{ R"(\\yso_win\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "d3d9.maxFrameLatency", "1" },
|
2022-07-25 15:33:42 +02:00
|
|
|
|
}} },
|
2022-08-06 16:18:57 +02:00
|
|
|
|
/* Saints Row 2 - Prevents unmap crash */
|
|
|
|
|
{ R"(\\SR2_pc\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "d3d9.textureMemory", "0" },
|
2022-08-06 16:18:57 +02:00
|
|
|
|
}} },
|
2022-08-07 20:04:37 +02:00
|
|
|
|
/* Witcher 1: Very long loading times */
|
|
|
|
|
{ R"(\\witcher\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "d3d9.cachedDynamicBuffers", "True" },
|
2022-08-07 20:04:37 +02:00
|
|
|
|
}} },
|
2022-07-29 23:40:46 +02:00
|
|
|
|
/* Guitar Hero World Tour *
|
|
|
|
|
* Very prone to address space crashes */
|
|
|
|
|
{ R"(\\(GHWT|GHWT_Definitive)\.exe$)", {{
|
|
|
|
|
{ "d3d9.textureMemory", "16" },
|
2022-08-11 03:00:20 +02:00
|
|
|
|
{ "d3d9.allowDirectBufferMapping", "False" },
|
2022-07-29 23:40:46 +02:00
|
|
|
|
}} },
|
2022-08-29 17:59:19 +03:00
|
|
|
|
/* Heroes of Annihilated Empires *
|
|
|
|
|
* Has issues with texture rendering and *
|
|
|
|
|
* video memory detection otherwise. */
|
|
|
|
|
{ R"(\\Heroes (o|O)f Annihilated Empires.*\\engine\.exe$)", {{
|
|
|
|
|
{ "d3d9.memoryTrackTest", "True" },
|
|
|
|
|
{ "d3d9.maxAvailableMemory", "2048" },
|
|
|
|
|
}} },
|
2022-09-07 18:28:37 +02:00
|
|
|
|
/* The Ship (2004) */
|
|
|
|
|
{ R"(\\ship\.exe$)", {{
|
|
|
|
|
{ "d3d9.memoryTrackTest", "True" },
|
|
|
|
|
}} },
|
2022-09-12 17:45:26 +02:00
|
|
|
|
/* SiN Episodes Emergence */
|
|
|
|
|
{ R"(\\SinEpisodes\.exe$)", {{
|
|
|
|
|
{ "d3d9.memoryTrackTest", "True" },
|
|
|
|
|
}} },
|
2022-10-15 17:21:24 +01:00
|
|
|
|
/* Hammer World Editor */
|
|
|
|
|
{ R"(\\(hammer(plusplus)?|mallet|wc)\.exe$)", {{
|
2023-05-26 12:33:36 +02:00
|
|
|
|
{ "d3d9.cachedDynamicBuffers", "True" },
|
2022-10-15 17:21:24 +01:00
|
|
|
|
}} },
|
2022-11-02 13:32:28 +01:00
|
|
|
|
/* Dragon Age Origins *
|
|
|
|
|
* Keeps unmapping the same 3 1MB buffers *
|
|
|
|
|
* thousands of times when you alt-tab out *
|
|
|
|
|
* Causing it to crash OOM */
|
|
|
|
|
{ R"(\\DAOrigins\.exe$)" , {{
|
|
|
|
|
{ "d3d9.allowDirectBufferMapping", "False" },
|
|
|
|
|
}} },
|
2022-11-05 00:14:24 +01:00
|
|
|
|
/* Fallout 3 - Doesn't like Intel Id */
|
|
|
|
|
{ R"(\\Fallout3\.exe$)", {{
|
|
|
|
|
{ "d3d9.customVendorId", "10de" },
|
2022-11-09 17:21:11 +01:00
|
|
|
|
}} },
|
|
|
|
|
/* Sonic & All-Stars Racing Transformed *
|
|
|
|
|
* Helps performance when Resizable BAR *
|
|
|
|
|
* is enabled */
|
|
|
|
|
{ R"(\\ASN_App_PcDx9_Final\.exe$)", {{
|
2023-05-26 12:33:36 +02:00
|
|
|
|
{ "d3d9.cachedDynamicBuffers", "True" },
|
2022-11-09 17:21:11 +01:00
|
|
|
|
}} },
|
2022-11-16 08:10:38 +01:00
|
|
|
|
/* Black Mesa *
|
|
|
|
|
* Artifacts & broken flashlight on Intel */
|
|
|
|
|
{ R"(\\bms\.exe$)", {{
|
|
|
|
|
{ "d3d9.customVendorId", "10de" },
|
|
|
|
|
}} },
|
2022-11-28 15:08:27 +01:00
|
|
|
|
/* Final Fantasy XIV - Direct3D 9 mode *
|
|
|
|
|
* Can crash with unmapping */
|
|
|
|
|
{ R"(\\ffxiv\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "d3d9.textureMemory", "0" },
|
2022-11-28 15:08:27 +01:00
|
|
|
|
}} },
|
2023-01-11 21:13:58 +01:00
|
|
|
|
/* Alien Rage *
|
|
|
|
|
* GTX 295 & disable Hack to fix shadows */
|
|
|
|
|
{ R"(\\(ShippingPC-AFEARGame|ARageMP)\.exe$)", {{
|
|
|
|
|
{ "d3d9.customVendorId", "10de" },
|
|
|
|
|
{ "d3d9.customDeviceId", "05E0" },
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.hideNvidiaGpu", "False" },
|
2023-01-11 21:13:58 +01:00
|
|
|
|
}} },
|
2023-02-18 10:54:14 +01:00
|
|
|
|
/* Battle Fantasia Revised Edition *
|
|
|
|
|
* Speedup above 60fps */
|
|
|
|
|
{ R"(\\bf10\.exe$)", {{
|
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
|
|
|
|
}} },
|
2023-01-24 22:03:08 +01:00
|
|
|
|
/* Codename Panzers Phase One/Two *
|
|
|
|
|
* Main menu won't render after intros */
|
|
|
|
|
{ R"(\\(PANZERS|PANZERS_Phase_2)\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "d3d9.enableDialogMode", "True" },
|
2023-01-24 22:03:08 +01:00
|
|
|
|
}} },
|
2023-03-27 19:22:35 +02:00
|
|
|
|
/* DC Universe Online *
|
|
|
|
|
* Freezes after alt tabbing */
|
|
|
|
|
{ R"(\\DCGAME\.EXE$)", {{
|
2023-06-10 01:18:05 +02:00
|
|
|
|
{ "d3d9.deviceLostOnFocusLoss", "True" },
|
2023-03-27 19:22:35 +02:00
|
|
|
|
}} },
|
2023-05-18 14:06:57 +02:00
|
|
|
|
/* Halo Online *
|
|
|
|
|
* Black textures */
|
|
|
|
|
{ R"(\\eldorado\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "d3d9.floatEmulation", "Strict" },
|
2023-05-18 14:06:57 +02:00
|
|
|
|
}} },
|
2023-05-26 16:01:29 +02:00
|
|
|
|
/* Injustice: Gods Among Us *
|
|
|
|
|
* Locks a buffer that's still in use */
|
|
|
|
|
{ R"(\\injustice\.exe$)", {{
|
|
|
|
|
{ "d3d9.allowDirectBufferMapping", "False" },
|
|
|
|
|
}} },
|
2023-06-18 00:44:06 +02:00
|
|
|
|
/* STEINS;GATE ELITE */
|
|
|
|
|
{ R"(\\SG_ELITE\\Game\.exe$)", {{
|
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
|
|
|
|
}} },
|
2023-07-05 17:51:04 +02:00
|
|
|
|
/* The Incredibles */
|
|
|
|
|
{ R"(\\IncPC\.exe$)", {{
|
|
|
|
|
{ "d3d9.maxFrameRate", "59" },
|
|
|
|
|
}} },
|
2023-08-09 12:18:10 +02:00
|
|
|
|
/* Conflict Vietnam */
|
|
|
|
|
{ R"(\\Vietnam\.exe$)", {{
|
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
|
|
|
|
}} },
|
2023-08-20 23:20:01 +02:00
|
|
|
|
/* Project: Snowblind */
|
2023-09-03 12:42:56 -07:00
|
|
|
|
{ R"(\\Snowblind\.(SP|MP|exe)$)", {{
|
2023-08-20 23:20:01 +02:00
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
|
|
|
|
}} },
|
2023-09-14 16:48:28 +02:00
|
|
|
|
/* Aviary Attorney */
|
2023-09-08 02:59:52 +02:00
|
|
|
|
{ R"(\\Aviary Attorney\\nw\.exe$)", {{
|
|
|
|
|
{ "d3d9.maxFrameRate", "60" },
|
|
|
|
|
}} },
|
2023-08-29 15:37:35 +03:00
|
|
|
|
/* Drakensang: The Dark Eye */
|
|
|
|
|
{ R"(\\drakensang\.exe$)", {{
|
|
|
|
|
{ "d3d9.deferSurfaceCreation", "True" },
|
|
|
|
|
}} },
|
2023-09-14 16:48:28 +02:00
|
|
|
|
/* Age of Empires 2 - janky frame timing */
|
|
|
|
|
{ R"(\\AoK HD\.exe$)", {{
|
|
|
|
|
{ "d3d9.maxFrameLatency", "1" },
|
|
|
|
|
}} },
|
2023-10-02 22:42:11 +02:00
|
|
|
|
/* Battlestations Midway */
|
|
|
|
|
{ R"(\\Battlestationsmidway\.exe$)", {{
|
|
|
|
|
{ "d3d9.cachedDynamicBuffers", "True" },
|
|
|
|
|
}} },
|
2023-10-11 12:52:28 +02:00
|
|
|
|
/* SkyDrift *
|
|
|
|
|
* Works around alt tab OOM crash */
|
|
|
|
|
{ R"(\\SkyDrift\.exe$)" , {{
|
|
|
|
|
{ "d3d9.allowDirectBufferMapping", "False" },
|
|
|
|
|
}} },
|
2023-09-03 12:43:23 -07:00
|
|
|
|
|
2023-03-22 17:06:21 +01:00
|
|
|
|
/**********************************************/
|
|
|
|
|
/* D3D12 GAMES (vkd3d-proton with dxvk dxgi) */
|
|
|
|
|
/**********************************************/
|
2023-09-03 12:43:23 -07:00
|
|
|
|
|
2023-03-22 17:06:21 +01:00
|
|
|
|
/* Diablo 4 - Will complain about missing *
|
|
|
|
|
* GPU unless dxgi Id match actual GPU Id */
|
|
|
|
|
{ R"(\\Diablo IV\.exe$)", {{
|
2023-08-14 19:14:18 +02:00
|
|
|
|
{ "dxgi.hideNvidiaGpu", "False" },
|
2023-03-22 17:06:21 +01:00
|
|
|
|
}} },
|
2023-06-06 21:19:14 +02:00
|
|
|
|
/* WILD HEARTS™️ *
|
|
|
|
|
* D3D12 title using D3D11 device for *
|
|
|
|
|
* media texture creation, whereby a large *
|
|
|
|
|
* chunk size only slows down media *
|
|
|
|
|
* initialization */
|
|
|
|
|
{ R"(\\WILD HEARTS(_Trial)?\.exe$)", {{
|
|
|
|
|
{ "dxvk.maxChunkSize", "4" },
|
|
|
|
|
}} },
|
2023-08-14 19:49:03 +02:00
|
|
|
|
/* Ratchet & Clank: Rift Apart - does not allow
|
|
|
|
|
* enabling ray tracing if it sees an AMD GPU. */
|
|
|
|
|
{ R"(\\RiftApart\.exe$)", {{
|
|
|
|
|
{ "dxgi.hideNvidiaGpu", "False" },
|
|
|
|
|
}} },
|
2023-10-09 15:16:30 -06:00
|
|
|
|
/* CP2077 enumerates display outputs each frame.
|
|
|
|
|
* Avoid using QueryDisplayConfig to avoid
|
|
|
|
|
* performance degradation until the
|
|
|
|
|
* optimization of that function is in Proton. */
|
|
|
|
|
{ R"(\\Cyberpunk2077\.exe$)", {{
|
|
|
|
|
{ "dxgi.useMonitorFallback", "True" },
|
|
|
|
|
}} },
|
2023-11-17 22:02:53 +01:00
|
|
|
|
/* Hitman 3 - Ray Tracing */
|
|
|
|
|
{ R"(\\HITMAN3\.exe$)", {{
|
|
|
|
|
{ "dxgi.hideNvidiaGpu", "False" },
|
|
|
|
|
}} },
|
2023-11-27 17:59:53 +01:00
|
|
|
|
/* Metro Exodus Enhanced Edition picks GPU adapters
|
|
|
|
|
* by available VRAM, which causes issues on some
|
|
|
|
|
* systems with integrated graphics. */
|
|
|
|
|
{ R"(\\Metro Exodus Enhanced Edition\\MetroExodus\.exe$)", {{
|
|
|
|
|
{ "dxvk.hideIntegratedGraphics", "True" },
|
|
|
|
|
}} },
|
2018-08-07 16:58:16 +02:00
|
|
|
|
}};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static bool isWhitespace(char ch) {
|
|
|
|
|
return ch == ' ' || ch == '\x9' || ch == '\r';
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-03 12:43:23 -07:00
|
|
|
|
|
2018-08-07 16:58:16 +02:00
|
|
|
|
static bool isValidKeyChar(char ch) {
|
|
|
|
|
return (ch >= '0' && ch <= '9')
|
|
|
|
|
|| (ch >= 'A' && ch <= 'Z')
|
|
|
|
|
|| (ch >= 'a' && ch <= 'z')
|
|
|
|
|
|| (ch == '.' || ch == '_');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static size_t skipWhitespace(const std::string& line, size_t n) {
|
|
|
|
|
while (n < line.size() && isWhitespace(line[n]))
|
|
|
|
|
n += 1;
|
|
|
|
|
return n;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 19:17:32 +02:00
|
|
|
|
struct ConfigContext {
|
|
|
|
|
bool active;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void parseUserConfigLine(Config& config, ConfigContext& ctx, const std::string& line) {
|
2018-08-07 16:58:16 +02:00
|
|
|
|
std::stringstream key;
|
|
|
|
|
std::stringstream value;
|
|
|
|
|
|
|
|
|
|
// Extract the key
|
|
|
|
|
size_t n = skipWhitespace(line, 0);
|
2019-04-26 19:17:32 +02:00
|
|
|
|
|
|
|
|
|
if (n < line.size() && line[n] == '[') {
|
|
|
|
|
n += 1;
|
|
|
|
|
|
|
|
|
|
size_t e = line.size() - 1;
|
|
|
|
|
while (e > n && line[e] != ']')
|
|
|
|
|
e -= 1;
|
|
|
|
|
|
|
|
|
|
while (n < e)
|
|
|
|
|
key << line[n++];
|
2023-09-03 12:43:23 -07:00
|
|
|
|
|
2019-04-26 19:17:32 +02:00
|
|
|
|
ctx.active = key.str() == env::getExeName();
|
|
|
|
|
} else {
|
|
|
|
|
while (n < line.size() && isValidKeyChar(line[n]))
|
|
|
|
|
key << line[n++];
|
2023-09-03 12:43:23 -07:00
|
|
|
|
|
2019-04-26 19:17:32 +02:00
|
|
|
|
// Check whether the next char is a '='
|
|
|
|
|
n = skipWhitespace(line, n);
|
|
|
|
|
if (n >= line.size() || line[n] != '=')
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
// Extract the value
|
2020-04-10 21:15:36 +02:00
|
|
|
|
bool insideString = false;
|
2019-04-26 19:17:32 +02:00
|
|
|
|
n = skipWhitespace(line, n + 1);
|
2020-04-10 21:15:36 +02:00
|
|
|
|
|
|
|
|
|
while (n < line.size()) {
|
|
|
|
|
if (!insideString && isWhitespace(line[n]))
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
if (line[n] == '"') {
|
|
|
|
|
insideString = !insideString;
|
|
|
|
|
n++;
|
|
|
|
|
} else
|
|
|
|
|
value << line[n++];
|
|
|
|
|
}
|
2023-09-03 12:43:23 -07:00
|
|
|
|
|
2019-04-26 19:17:32 +02:00
|
|
|
|
if (ctx.active)
|
|
|
|
|
config.setOption(key.str(), value.str());
|
|
|
|
|
}
|
2018-08-07 16:58:16 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2018-08-07 14:13:57 +02:00
|
|
|
|
Config::Config() { }
|
|
|
|
|
Config::~Config() { }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Config::Config(OptionMap&& options)
|
|
|
|
|
: m_options(std::move(options)) { }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Config::merge(const Config& other) {
|
|
|
|
|
for (auto& pair : other.m_options)
|
|
|
|
|
m_options.insert(pair);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Config::setOption(const std::string& key, const std::string& value) {
|
|
|
|
|
m_options.insert_or_assign(key, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::string Config::getOptionValue(const char* option) const {
|
|
|
|
|
auto iter = m_options.find(option);
|
|
|
|
|
|
|
|
|
|
return iter != m_options.end()
|
|
|
|
|
? iter->second : std::string();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool Config::parseOptionValue(
|
|
|
|
|
const std::string& value,
|
|
|
|
|
std::string& result) {
|
|
|
|
|
result = value;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool Config::parseOptionValue(
|
|
|
|
|
const std::string& value,
|
|
|
|
|
bool& result) {
|
2021-09-19 16:20:57 +02:00
|
|
|
|
static const std::array<std::pair<const char*, bool>, 2> s_lookup = {{
|
|
|
|
|
{ "true", true },
|
|
|
|
|
{ "false", false },
|
|
|
|
|
}};
|
|
|
|
|
|
|
|
|
|
return parseStringOption(value,
|
|
|
|
|
s_lookup.begin(), s_lookup.end(), result);
|
2018-08-07 14:13:57 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool Config::parseOptionValue(
|
|
|
|
|
const std::string& value,
|
|
|
|
|
int32_t& result) {
|
|
|
|
|
if (value.size() == 0)
|
|
|
|
|
return false;
|
2023-09-03 12:43:23 -07:00
|
|
|
|
|
2018-08-07 14:13:57 +02:00
|
|
|
|
// Parse sign, don't allow '+'
|
|
|
|
|
int32_t sign = 1;
|
|
|
|
|
size_t start = 0;
|
|
|
|
|
|
|
|
|
|
if (value[0] == '-') {
|
|
|
|
|
sign = -1;
|
|
|
|
|
start = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Parse absolute number
|
|
|
|
|
int32_t intval = 0;
|
|
|
|
|
|
|
|
|
|
for (size_t i = start; i < value.size(); i++) {
|
|
|
|
|
if (value[i] < '0' || value[i] > '9')
|
|
|
|
|
return false;
|
2023-09-03 12:43:23 -07:00
|
|
|
|
|
2018-08-07 14:13:57 +02:00
|
|
|
|
intval *= 10;
|
|
|
|
|
intval += value[i] - '0';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Apply sign and return
|
|
|
|
|
result = sign * intval;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2023-09-03 12:43:23 -07:00
|
|
|
|
|
|
|
|
|
|
2022-08-01 12:05:43 +02:00
|
|
|
|
bool Config::parseOptionValue(
|
|
|
|
|
const std::string& value,
|
|
|
|
|
float& result) {
|
|
|
|
|
if (value.size() == 0)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
// Parse sign
|
|
|
|
|
size_t pos = 0;
|
|
|
|
|
bool negate = false;
|
|
|
|
|
|
|
|
|
|
if (value[0] == '-') {
|
|
|
|
|
negate = true;
|
2022-08-01 20:24:31 +02:00
|
|
|
|
|
|
|
|
|
if (++pos == value.size())
|
|
|
|
|
return false;
|
2022-08-01 12:05:43 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Parse integer part
|
|
|
|
|
uint64_t intPart = 0;
|
|
|
|
|
|
|
|
|
|
if (value[pos] == '.')
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
while (pos < value.size()) {
|
|
|
|
|
if (value[pos] == '.') {
|
|
|
|
|
if (++pos == value.size())
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (value[pos] < '0' || value[pos] > '9')
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
intPart *= 10;
|
|
|
|
|
intPart += value[pos] - '0';
|
|
|
|
|
pos += 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Parse fractional part
|
|
|
|
|
uint64_t fractPart = 0;
|
|
|
|
|
uint64_t fractDivisor = 1;
|
|
|
|
|
|
|
|
|
|
while (pos < value.size()) {
|
|
|
|
|
if (value[pos] < '0' || value[pos] > '9')
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
fractDivisor *= 10;
|
|
|
|
|
fractPart *= 10;
|
|
|
|
|
fractPart += value[pos] - '0';
|
|
|
|
|
pos += 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Compute final number, not super accurate but this should do
|
|
|
|
|
result = float((double(fractPart) / double(fractDivisor)) + double(intPart));
|
|
|
|
|
|
|
|
|
|
if (negate)
|
|
|
|
|
result = -result;
|
|
|
|
|
|
2022-08-01 20:24:31 +02:00
|
|
|
|
return std::isfinite(result);
|
2022-08-01 12:05:43 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2019-01-08 20:57:38 +01:00
|
|
|
|
bool Config::parseOptionValue(
|
|
|
|
|
const std::string& value,
|
|
|
|
|
Tristate& result) {
|
2021-09-19 16:20:57 +02:00
|
|
|
|
static const std::array<std::pair<const char*, Tristate>, 3> s_lookup = {{
|
|
|
|
|
{ "true", Tristate::True },
|
|
|
|
|
{ "false", Tristate::False },
|
|
|
|
|
{ "auto", Tristate::Auto },
|
|
|
|
|
}};
|
|
|
|
|
|
|
|
|
|
return parseStringOption(value,
|
|
|
|
|
s_lookup.begin(), s_lookup.end(), result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename I, typename V>
|
|
|
|
|
bool Config::parseStringOption(
|
|
|
|
|
std::string str,
|
|
|
|
|
I begin,
|
|
|
|
|
I end,
|
|
|
|
|
V& value) {
|
2021-11-12 15:13:11 +01:00
|
|
|
|
str = Config::toLower(str);
|
2021-09-19 16:20:57 +02:00
|
|
|
|
|
|
|
|
|
for (auto i = begin; i != end; i++) {
|
|
|
|
|
if (str == i->first) {
|
|
|
|
|
value = i->second;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2019-01-08 20:57:38 +01:00
|
|
|
|
}
|
2021-09-19 16:20:57 +02:00
|
|
|
|
|
|
|
|
|
return false;
|
2019-01-08 20:57:38 +01:00
|
|
|
|
}
|
2018-08-07 14:13:57 +02:00
|
|
|
|
|
2018-08-07 16:58:16 +02:00
|
|
|
|
|
|
|
|
|
Config Config::getAppConfig(const std::string& appName) {
|
2019-08-17 11:46:56 +02:00
|
|
|
|
auto appConfig = std::find_if(g_appDefaults.begin(), g_appDefaults.end(),
|
|
|
|
|
[&appName] (const std::pair<const char*, Config>& pair) {
|
|
|
|
|
std::regex expr(pair.first, std::regex::extended | std::regex::icase);
|
|
|
|
|
return std::regex_search(appName, expr);
|
|
|
|
|
});
|
2023-09-03 12:43:23 -07:00
|
|
|
|
|
2018-09-09 13:46:57 +02:00
|
|
|
|
if (appConfig != g_appDefaults.end()) {
|
|
|
|
|
// Inform the user that we loaded a default config
|
2019-08-17 11:46:56 +02:00
|
|
|
|
Logger::info(str::format("Found built-in config:"));
|
2022-06-21 22:19:05 +03:00
|
|
|
|
|
|
|
|
|
for (auto& pair : appConfig->second.m_options)
|
|
|
|
|
Logger::info(str::format(" ", pair.first, " = ", pair.second));
|
|
|
|
|
|
2018-08-07 16:58:16 +02:00
|
|
|
|
return appConfig->second;
|
2018-09-09 13:46:57 +02:00
|
|
|
|
}
|
|
|
|
|
|
2018-08-07 16:58:16 +02:00
|
|
|
|
return Config();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Config Config::getUserConfig() {
|
|
|
|
|
Config config;
|
|
|
|
|
|
|
|
|
|
// Load either $DXVK_CONFIG_FILE or $PWD/dxvk.conf
|
2018-11-15 17:12:09 -05:00
|
|
|
|
std::string filePath = env::getEnvVar("DXVK_CONFIG_FILE");
|
2023-08-01 23:09:29 +03:00
|
|
|
|
std::string confLine = env::getEnvVar("DXVK_CONFIG");
|
2018-08-07 16:58:16 +02:00
|
|
|
|
|
|
|
|
|
if (filePath == "")
|
|
|
|
|
filePath = "dxvk.conf";
|
2023-09-03 12:43:23 -07:00
|
|
|
|
|
2018-08-07 16:58:16 +02:00
|
|
|
|
// Open the file if it exists
|
2022-08-09 12:13:43 +01:00
|
|
|
|
std::ifstream stream(str::topath(filePath.c_str()).c_str());
|
2018-08-07 16:58:16 +02:00
|
|
|
|
|
2023-08-01 23:09:29 +03:00
|
|
|
|
if (!stream && confLine.empty())
|
2018-08-07 16:58:16 +02:00
|
|
|
|
return config;
|
|
|
|
|
|
2019-04-26 19:17:32 +02:00
|
|
|
|
// Initialize parser context
|
|
|
|
|
ConfigContext ctx;
|
|
|
|
|
ctx.active = true;
|
|
|
|
|
|
2023-08-01 23:09:29 +03:00
|
|
|
|
if (stream) {
|
|
|
|
|
// Inform the user that we loaded a file, might
|
|
|
|
|
// help when debugging configuration issues
|
|
|
|
|
Logger::info(str::format("Found config file: ", filePath));
|
|
|
|
|
|
|
|
|
|
// Parse the file line by line
|
|
|
|
|
std::string line;
|
|
|
|
|
|
|
|
|
|
while (std::getline(stream, line))
|
|
|
|
|
parseUserConfigLine(config, ctx, line);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!confLine.empty()) {
|
|
|
|
|
// Inform the user that we parsing config from environment, might
|
|
|
|
|
// help when debugging configuration issues
|
|
|
|
|
Logger::info(str::format("Found config env: ", confLine));
|
|
|
|
|
|
|
|
|
|
for(auto l : str::split(confLine, ";"))
|
|
|
|
|
parseUserConfigLine(config, ctx, std::string(l.data(), l.size()));
|
|
|
|
|
}
|
2018-08-07 16:58:16 +02:00
|
|
|
|
|
|
|
|
|
return config;
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-09 13:46:57 +02:00
|
|
|
|
|
|
|
|
|
void Config::logOptions() const {
|
|
|
|
|
if (!m_options.empty()) {
|
|
|
|
|
Logger::info("Effective configuration:");
|
|
|
|
|
|
|
|
|
|
for (auto& pair : m_options)
|
|
|
|
|
Logger::info(str::format(" ", pair.first, " = ", pair.second));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-12 15:13:11 +01:00
|
|
|
|
std::string Config::toLower(std::string str) {
|
|
|
|
|
std::transform(str.begin(), str.end(), str.begin(),
|
|
|
|
|
[] (unsigned char c) { return (c >= 'A' && c <= 'Z') ? (c + 'a' - 'A') : c; });
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-08 12:46:21 +02:00
|
|
|
|
}
|