From 03cf8183a799b1212ee33f9692d27761e06ac798 Mon Sep 17 00:00:00 2001 From: Rankyn Bass Date: Sun, 11 Dec 2022 14:48:22 -0800 Subject: [PATCH 1/8] feat: add DXVK settings tab * removed a few settings from wine tab * Added dxvk settings to launcher.ini * Updated CreateCompatToolsInstance to work with new dxvkSettings * Requires PR#1205 from FFXIVQuickLauncher * Suggest doing PR#13, #15 on xlcore, for better look and feel. --- .../Components/SettingsPage/SettingsPage.cs | 1 + .../SettingsPage/Tabs/SettingsTabDXVK.cs | 66 +++++++++++++++++++ .../SettingsPage/Tabs/SettingsTabWine.cs | 2 - .../Configuration/ILauncherConfig.cs | 8 +++ src/XIVLauncher.Core/Program.cs | 6 +- 5 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs diff --git a/src/XIVLauncher.Core/Components/SettingsPage/SettingsPage.cs b/src/XIVLauncher.Core/Components/SettingsPage/SettingsPage.cs index c4886f48..2d066a82 100644 --- a/src/XIVLauncher.Core/Components/SettingsPage/SettingsPage.cs +++ b/src/XIVLauncher.Core/Components/SettingsPage/SettingsPage.cs @@ -11,6 +11,7 @@ public class SettingsPage : Page new SettingsTabGame(), new SettingsTabPatching(), new SettingsTabWine(), + new SettingsTabDXVK(), new SettingsTabDalamud(), new SettingsTabAutoStart(), new SettingsTabAbout(), diff --git a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs new file mode 100644 index 00000000..0bd72cb8 --- /dev/null +++ b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs @@ -0,0 +1,66 @@ +using System.Numerics; +using System.Runtime.InteropServices; +using ImGuiNET; +using XIVLauncher.Common.Unix.Compatibility; +using XIVLauncher.Common.Util; + +namespace XIVLauncher.Core.Components.SettingsPage.Tabs; + +public class SettingsTabDXVK : SettingsTab +{ + private SettingsEntry dxvkHudSetting; + + public SettingsTabDXVK() + { + Entries = new SettingsEntry[] + { + new SettingsEntry("DXVK Version", "Choose which version of DXVK to use.", () => Program.Config.DxvkVersion, type => Program.Config.DxvkVersion = type), + new SettingsEntry("Enable DXVK ASYNC", "Enable DXVK ASYNC patch.", () => Program.Config.DxvkAsyncEnabled ?? true, b => Program.Config.DxvkAsyncEnabled = b), + dxvkHudSetting = new SettingsEntry("DXVK Overlay", "DXVK Hud is included. MangoHud must be installed separately.\nFlatpak XIVLauncher needs flatpak MangoHud.", () => Program.Config.DxvkHudType, type => Program.Config.DxvkHudType = type) + { + CheckValidity = type => + { + if ((type == Dxvk.DxvkHudType.MangoHud || type == Dxvk.DxvkHudType.MangoHudCustom || type == Dxvk.DxvkHudType.MangoHudFull) + && (!File.Exists("/usr/lib/mangohud/libMangoHud.so") && !File.Exists("/usr/lib/extensions/vulkan/MangoHud/lib/x86_64-linux-gnu/libMangoHud.so"))) + return "MangoHud not detected."; + + return null; + } + }, + new SettingsEntry("DXVK Hud Custom String", "Set a custom string for the built in DXVK Hud. Warning: If it's invalid, the game may hang.", () => Program.Config.DxvkHudCustom, s => Program.Config.DxvkHudCustom = s) + { + CheckVisibility = () => dxvkHudSetting.Value == Dxvk.DxvkHudType.Custom, + CheckWarning = s => + { + if(!DxvkSettings.CheckDxvkHudString(s)) + return "That's not a valid hud string"; + return null; + }, + }, + new SettingsEntry("MangoHud Custom Path", "Set a custom path for MangoHud config file.", () => Program.Config.DxvkMangoCustom, s => Program.Config.DxvkMangoCustom = s) + { + CheckVisibility = () => dxvkHudSetting.Value == Dxvk.DxvkHudType.MangoHudCustom, + CheckWarning = s => + { + if(!DxvkSettings.CheckMangoHudPath(s)) + return "That's not a valid file."; + return null; + }, + }, + new NumericSettingsEntry("Frame Rate Limit", "Set a frame rate limit, and DXVK will try not exceed it. Use 0 to leave unset.", () => Program.Config.DxvkFrameRate ?? 0, i => Program.Config.DxvkFrameRate = i, 0, 1000), + }; + } + + public override SettingsEntry[] Entries { get; } + + public override bool IsUnixExclusive => true; + + public override string Title => "DXVK"; + + public override void Save() + { + base.Save(); + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + Program.CreateCompatToolsInstance(); + } +} \ No newline at end of file diff --git a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabWine.cs b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabWine.cs index dc4fbcfa..9387df3d 100644 --- a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabWine.cs +++ b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabWine.cs @@ -36,7 +36,6 @@ public SettingsTabWine() } }, - new SettingsEntry("Enable DXVK ASYNC", "Enable DXVK ASYNC patch.", () => Program.Config.DxvkAsyncEnabled ?? true, b => Program.Config.DxvkAsyncEnabled = b), new SettingsEntry("Enable ESync", "Enable eventfd-based synchronization.", () => Program.Config.ESyncEnabled ?? true, b => Program.Config.ESyncEnabled = b), new SettingsEntry("Enable FSync", "Enable fast user mutex (futex2).", () => Program.Config.FSyncEnabled ?? true, b => Program.Config.FSyncEnabled = b) { @@ -50,7 +49,6 @@ public SettingsTabWine() } }, - new SettingsEntry("DXVK Overlay", "Configure how much of the DXVK overlay is to be shown.", () => Program.Config.DxvkHudType, type => Program.Config.DxvkHudType = type), new SettingsEntry("WINEDEBUG Variables", "Configure debug logging for wine. Useful for troubleshooting.", () => Program.Config.WineDebugVars ?? string.Empty, s => Program.Config.WineDebugVars = s) }; } diff --git a/src/XIVLauncher.Core/Configuration/ILauncherConfig.cs b/src/XIVLauncher.Core/Configuration/ILauncherConfig.cs index bd72c4e2..a25536ad 100644 --- a/src/XIVLauncher.Core/Configuration/ILauncherConfig.cs +++ b/src/XIVLauncher.Core/Configuration/ILauncherConfig.cs @@ -66,14 +66,22 @@ public interface ILauncherConfig public bool? GameModeEnabled { get; set; } + public Dxvk.DxvkVersion DxvkVersion { get; set; } + public bool? DxvkAsyncEnabled { get; set; } + public int? DxvkFrameRate { get; set; } + public bool? ESyncEnabled { get; set; } public bool? FSyncEnabled { get; set; } public Dxvk.DxvkHudType DxvkHudType { get; set; } + public string? DxvkHudCustom { get; set; } + + public string? DxvkMangoCustom { get; set; } + public string? WineDebugVars { get; set; } #endregion diff --git a/src/XIVLauncher.Core/Program.cs b/src/XIVLauncher.Core/Program.cs index 11d89809..fe8ef798 100644 --- a/src/XIVLauncher.Core/Program.cs +++ b/src/XIVLauncher.Core/Program.cs @@ -108,8 +108,11 @@ private static void LoadConfig(Storage storage) Config.GameModeEnabled ??= false; Config.DxvkAsyncEnabled ??= true; + Config.DxvkFrameRate ??= 0; Config.ESyncEnabled ??= true; Config.FSyncEnabled ??= false; + Config.DxvkHudCustom ??= "fps,frametimes,gpuload,version"; + Config.DxvkMangoCustom ??= Environment.GetEnvironmentVariable("HOME") + "/.config/MangoHud/MangoHud.conf"; Config.WineStartupType ??= WineStartupType.Managed; Config.WineBinaryPath ??= "/usr/bin"; @@ -275,7 +278,8 @@ public static void CreateCompatToolsInstance() var winePrefix = storage.GetFolder("wineprefix"); var wineSettings = new WineSettings(Config.WineStartupType, Config.WineBinaryPath, Config.WineDebugVars, wineLogFile, winePrefix, Config.ESyncEnabled, Config.FSyncEnabled); var toolsFolder = storage.GetFolder("compatibilitytool"); - CompatibilityTools = new CompatibilityTools(wineSettings, Config.DxvkHudType, Config.GameModeEnabled, Config.DxvkAsyncEnabled, toolsFolder); + var dxvkSettings = new DxvkSettings(Config.DxvkHudType, Config.DxvkHudCustom, Config.DxvkMangoCustom, Config.DxvkAsyncEnabled, Config.DxvkFrameRate, Config.DxvkVersion, storage.Root); + CompatibilityTools = new CompatibilityTools(wineSettings, dxvkSettings, Config.GameModeEnabled, toolsFolder); } public static void ShowWindow() From 21de7aef558aa59e372b228e5f838247b5a8df93 Mon Sep 17 00:00:00 2001 From: Rankyn Bass Date: Sun, 11 Dec 2022 22:40:42 -0800 Subject: [PATCH 2/8] update to work with latest dxvk-settings-rework changes --- lib/FFXIVQuickLauncher | 2 +- .../Components/SettingsPage/Tabs/SettingsTabWine.cs | 5 ++++- src/XIVLauncher.Core/Configuration/ILauncherConfig.cs | 2 ++ src/XIVLauncher.Core/Program.cs | 5 +++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/FFXIVQuickLauncher b/lib/FFXIVQuickLauncher index 77115d3f..84b96375 160000 --- a/lib/FFXIVQuickLauncher +++ b/lib/FFXIVQuickLauncher @@ -1 +1 @@ -Subproject commit 77115d3f7d920179ce83f0708ec97ba2450ce795 +Subproject commit 84b9637578c7add03ebc1d35c947367e190cc801 diff --git a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabWine.cs b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabWine.cs index 9387df3d..4e68b528 100644 --- a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabWine.cs +++ b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabWine.cs @@ -49,7 +49,10 @@ public SettingsTabWine() } }, - new SettingsEntry("WINEDEBUG Variables", "Configure debug logging for wine. Useful for troubleshooting.", () => Program.Config.WineDebugVars ?? string.Empty, s => Program.Config.WineDebugVars = s) + new SettingsEntry("WINEDEBUG Variables", "Configure debug logging for wine. Useful for troubleshooting.", () => Program.Config.WineDebugVars ?? string.Empty, s => Program.Config.WineDebugVars = s), + new SettingsEntry("Use WineD3D (Disable DXVK)", + "Don't check this unless you know what you're doing.\nIf you check this, XIVLauncher will try to use WineD3D instead of DXVK, and nothing in the DXVK tab will work.\nCustom wine versions may not work (especially proton-based wine). This will also break GShade.", + () => Program.Config.WineD3DEnabled ?? false, b => Program.Config.WineD3DEnabled = b), }; } diff --git a/src/XIVLauncher.Core/Configuration/ILauncherConfig.cs b/src/XIVLauncher.Core/Configuration/ILauncherConfig.cs index a25536ad..6d63fcb3 100644 --- a/src/XIVLauncher.Core/Configuration/ILauncherConfig.cs +++ b/src/XIVLauncher.Core/Configuration/ILauncherConfig.cs @@ -66,6 +66,8 @@ public interface ILauncherConfig public bool? GameModeEnabled { get; set; } + public bool? WineD3DEnabled { get; set; } + public Dxvk.DxvkVersion DxvkVersion { get; set; } public bool? DxvkAsyncEnabled { get; set; } diff --git a/src/XIVLauncher.Core/Program.cs b/src/XIVLauncher.Core/Program.cs index fe8ef798..354eb7bb 100644 --- a/src/XIVLauncher.Core/Program.cs +++ b/src/XIVLauncher.Core/Program.cs @@ -107,12 +107,13 @@ private static void LoadConfig(Storage storage) Config.GlobalScale ??= 1.0f; Config.GameModeEnabled ??= false; + Config.WineD3DEnabled ??= false; Config.DxvkAsyncEnabled ??= true; Config.DxvkFrameRate ??= 0; Config.ESyncEnabled ??= true; Config.FSyncEnabled ??= false; Config.DxvkHudCustom ??= "fps,frametimes,gpuload,version"; - Config.DxvkMangoCustom ??= Environment.GetEnvironmentVariable("HOME") + "/.config/MangoHud/MangoHud.conf"; + Config.DxvkMangoCustom ??= Path.Combine(Environment.GetEnvironmentVariable("HOME"), ".config", "MangoHud", "MangoHud.conf"); Config.WineStartupType ??= WineStartupType.Managed; Config.WineBinaryPath ??= "/usr/bin"; @@ -278,7 +279,7 @@ public static void CreateCompatToolsInstance() var winePrefix = storage.GetFolder("wineprefix"); var wineSettings = new WineSettings(Config.WineStartupType, Config.WineBinaryPath, Config.WineDebugVars, wineLogFile, winePrefix, Config.ESyncEnabled, Config.FSyncEnabled); var toolsFolder = storage.GetFolder("compatibilitytool"); - var dxvkSettings = new DxvkSettings(Config.DxvkHudType, Config.DxvkHudCustom, Config.DxvkMangoCustom, Config.DxvkAsyncEnabled, Config.DxvkFrameRate, Config.DxvkVersion, storage.Root); + var dxvkSettings = new DxvkSettings(Config.DxvkHudType, storage.Root, Config.DxvkVersion, !Config.WineD3DEnabled ?? true, Config.DxvkHudCustom, new FileInfo(Config.DxvkMangoCustom), Config.DxvkAsyncEnabled ?? true, Config.DxvkFrameRate ?? 0); CompatibilityTools = new CompatibilityTools(wineSettings, dxvkSettings, Config.GameModeEnabled, toolsFolder); } From 3dd0330995a809ebed2f25e044e7cb999d59eb50 Mon Sep 17 00:00:00 2001 From: Rankyn Bass Date: Mon, 12 Dec 2022 16:41:40 -0800 Subject: [PATCH 3/8] fix: get rid of useless function, use File.Exists --- .../Components/SettingsPage/Tabs/SettingsTabDXVK.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs index 0bd72cb8..e98a15e8 100644 --- a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs +++ b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs @@ -1,3 +1,4 @@ +using System.IO; using System.Numerics; using System.Runtime.InteropServices; using ImGuiNET; @@ -42,12 +43,12 @@ public SettingsTabDXVK() CheckVisibility = () => dxvkHudSetting.Value == Dxvk.DxvkHudType.MangoHudCustom, CheckWarning = s => { - if(!DxvkSettings.CheckMangoHudPath(s)) + if(!File.Exists(s)) return "That's not a valid file."; return null; }, }, - new NumericSettingsEntry("Frame Rate Limit", "Set a frame rate limit, and DXVK will try not exceed it. Use 0 to leave unset.", () => Program.Config.DxvkFrameRate ?? 0, i => Program.Config.DxvkFrameRate = i, 0, 1000), + new NumericSettingsEntry("Frame Rate Limit", "Set a frame rate limit, and DXVK will try not exceed it. Use 0 for unlimited.", () => Program.Config.DxvkFrameRate ?? 0, i => Program.Config.DxvkFrameRate = i, 0, 1000), }; } From 39547e7d0ecfd1e5a0a4f7c01f753240928d8260 Mon Sep 17 00:00:00 2001 From: Rankyn Bass Date: Mon, 12 Dec 2022 16:46:06 -0800 Subject: [PATCH 4/8] update submodule --- lib/FFXIVQuickLauncher | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/FFXIVQuickLauncher b/lib/FFXIVQuickLauncher index 84b96375..810bcc95 160000 --- a/lib/FFXIVQuickLauncher +++ b/lib/FFXIVQuickLauncher @@ -1 +1 @@ -Subproject commit 84b9637578c7add03ebc1d35c947367e190cc801 +Subproject commit 810bcc95771fa9657021c47549eb950825dad506 From ace2834089e951139f083f7ef25fc0e2e66754f5 Mon Sep 17 00:00:00 2001 From: Rankyn Bass Date: Wed, 4 Jan 2023 18:26:49 -0800 Subject: [PATCH 5/8] update: dxvk version to 1.10.3 --- lib/FFXIVQuickLauncher | 2 +- .../Components/SettingsPage/Tabs/SettingsTabDXVK.cs | 2 +- src/XIVLauncher.Core/Configuration/ILauncherConfig.cs | 2 +- src/XIVLauncher.Core/Program.cs | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/FFXIVQuickLauncher b/lib/FFXIVQuickLauncher index 810bcc95..a5f6ffd5 160000 --- a/lib/FFXIVQuickLauncher +++ b/lib/FFXIVQuickLauncher @@ -1 +1 @@ -Subproject commit 810bcc95771fa9657021c47549eb950825dad506 +Subproject commit a5f6ffd5cfc95face18934c0f8d18c4f52667477 diff --git a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs index e98a15e8..de945366 100644 --- a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs +++ b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs @@ -15,7 +15,7 @@ public SettingsTabDXVK() { Entries = new SettingsEntry[] { - new SettingsEntry("DXVK Version", "Choose which version of DXVK to use.", () => Program.Config.DxvkVersion, type => Program.Config.DxvkVersion = type), + new SettingsEntry("DXVK Version", "Choose which version of DXVK to use.", () => Program.Config.DxvkVersion ?? Dxvk.DxvkVersion.v1_10_3, type => Program.Config.DxvkVersion = type), new SettingsEntry("Enable DXVK ASYNC", "Enable DXVK ASYNC patch.", () => Program.Config.DxvkAsyncEnabled ?? true, b => Program.Config.DxvkAsyncEnabled = b), dxvkHudSetting = new SettingsEntry("DXVK Overlay", "DXVK Hud is included. MangoHud must be installed separately.\nFlatpak XIVLauncher needs flatpak MangoHud.", () => Program.Config.DxvkHudType, type => Program.Config.DxvkHudType = type) { diff --git a/src/XIVLauncher.Core/Configuration/ILauncherConfig.cs b/src/XIVLauncher.Core/Configuration/ILauncherConfig.cs index 6d63fcb3..2d5749eb 100644 --- a/src/XIVLauncher.Core/Configuration/ILauncherConfig.cs +++ b/src/XIVLauncher.Core/Configuration/ILauncherConfig.cs @@ -68,7 +68,7 @@ public interface ILauncherConfig public bool? WineD3DEnabled { get; set; } - public Dxvk.DxvkVersion DxvkVersion { get; set; } + public Dxvk.DxvkVersion? DxvkVersion { get; set; } public bool? DxvkAsyncEnabled { get; set; } diff --git a/src/XIVLauncher.Core/Program.cs b/src/XIVLauncher.Core/Program.cs index 354eb7bb..6601add0 100644 --- a/src/XIVLauncher.Core/Program.cs +++ b/src/XIVLauncher.Core/Program.cs @@ -108,6 +108,7 @@ private static void LoadConfig(Storage storage) Config.GameModeEnabled ??= false; Config.WineD3DEnabled ??= false; + Config.DxvkVersion ??= Dxvk.DxvkVersion.v1_10_3; Config.DxvkAsyncEnabled ??= true; Config.DxvkFrameRate ??= 0; Config.ESyncEnabled ??= true; @@ -279,7 +280,7 @@ public static void CreateCompatToolsInstance() var winePrefix = storage.GetFolder("wineprefix"); var wineSettings = new WineSettings(Config.WineStartupType, Config.WineBinaryPath, Config.WineDebugVars, wineLogFile, winePrefix, Config.ESyncEnabled, Config.FSyncEnabled); var toolsFolder = storage.GetFolder("compatibilitytool"); - var dxvkSettings = new DxvkSettings(Config.DxvkHudType, storage.Root, Config.DxvkVersion, !Config.WineD3DEnabled ?? true, Config.DxvkHudCustom, new FileInfo(Config.DxvkMangoCustom), Config.DxvkAsyncEnabled ?? true, Config.DxvkFrameRate ?? 0); + var dxvkSettings = new DxvkSettings(Config.DxvkHudType, storage.Root, Config.DxvkVersion ?? Dxvk.DxvkVersion.v1_10_3, !Config.WineD3DEnabled ?? true, Config.DxvkHudCustom, new FileInfo(Config.DxvkMangoCustom), Config.DxvkAsyncEnabled ?? true, Config.DxvkFrameRate ?? 0); CompatibilityTools = new CompatibilityTools(wineSettings, dxvkSettings, Config.GameModeEnabled, toolsFolder); } From 444e453aa173ef718c2378ffaf13c56284877a02 Mon Sep 17 00:00:00 2001 From: Rankyn Bass Date: Thu, 26 Jan 2023 17:06:59 -0800 Subject: [PATCH 6/8] Add dxvk 2.1 (no async) --- lib/FFXIVQuickLauncher | 2 +- .../SettingsPage/Tabs/SettingsTabDXVK.cs | 22 +++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/lib/FFXIVQuickLauncher b/lib/FFXIVQuickLauncher index a5f6ffd5..26b704cd 160000 --- a/lib/FFXIVQuickLauncher +++ b/lib/FFXIVQuickLauncher @@ -1 +1 @@ -Subproject commit a5f6ffd5cfc95face18934c0f8d18c4f52667477 +Subproject commit 26b704cd828033c77bac08aae315f8fa028b306f diff --git a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs index de945366..00948ee7 100644 --- a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs +++ b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs @@ -9,14 +9,32 @@ namespace XIVLauncher.Core.Components.SettingsPage.Tabs; public class SettingsTabDXVK : SettingsTab { + private SettingsEntry dxvkVersionSetting; private SettingsEntry dxvkHudSetting; public SettingsTabDXVK() { Entries = new SettingsEntry[] { - new SettingsEntry("DXVK Version", "Choose which version of DXVK to use.", () => Program.Config.DxvkVersion ?? Dxvk.DxvkVersion.v1_10_3, type => Program.Config.DxvkVersion = type), - new SettingsEntry("Enable DXVK ASYNC", "Enable DXVK ASYNC patch.", () => Program.Config.DxvkAsyncEnabled ?? true, b => Program.Config.DxvkAsyncEnabled = b), + dxvkVersionSetting = new SettingsEntry("DXVK Version", "Choose which version of DXVK to use.", () => Program.Config.DxvkVersion ?? Dxvk.DxvkVersion.v1_10_3, type => Program.Config.DxvkVersion = type) + { + CheckWarning = type => + { + if(type == Dxvk.DxvkVersion.v2_1) + return "AMD users may need to use env variable RADV_PERFTEST=gpl"; + return null; + }, + }, + new SettingsEntry("Enable DXVK ASYNC", "Enable DXVK ASYNC patch.", () => Program.Config.DxvkAsyncEnabled ?? true, b => Program.Config.DxvkAsyncEnabled = b) + { + CheckVisibility = () => dxvkVersionSetting.Value != Dxvk.DxvkVersion.v2_1, + CheckWarning = b => + { + if(!b && dxvkVersionSetting.Value == Dxvk.DxvkVersion.v2_0) + return "AMD users may need to use env variable RADV_PERFTEST=gpl"; + return null; + }, + }, dxvkHudSetting = new SettingsEntry("DXVK Overlay", "DXVK Hud is included. MangoHud must be installed separately.\nFlatpak XIVLauncher needs flatpak MangoHud.", () => Program.Config.DxvkHudType, type => Program.Config.DxvkHudType = type) { CheckValidity = type => From c866470e2ebd33446a9739a9d0d843305cb55f7b Mon Sep 17 00:00:00 2001 From: Rankyn Bass Date: Tue, 2 May 2023 20:39:09 -0700 Subject: [PATCH 7/8] Add /usr/lib64 as possible mangohud lib path --- .../Components/SettingsPage/Tabs/SettingsTabDXVK.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs index 00948ee7..d3993878 100644 --- a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs +++ b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs @@ -40,7 +40,7 @@ public SettingsTabDXVK() CheckValidity = type => { if ((type == Dxvk.DxvkHudType.MangoHud || type == Dxvk.DxvkHudType.MangoHudCustom || type == Dxvk.DxvkHudType.MangoHudFull) - && (!File.Exists("/usr/lib/mangohud/libMangoHud.so") && !File.Exists("/usr/lib/extensions/vulkan/MangoHud/lib/x86_64-linux-gnu/libMangoHud.so"))) + && (!File.Exists("/usr/lib/mangohud/libMangoHud.so") && !File.Exists("/usr/lib64/mangohud/libMangoHud.so") && !File.Exists("/usr/lib/extensions/vulkan/MangoHud/lib/x86_64-linux-gnu/libMangoHud.so"))) return "MangoHud not detected."; return null; From 6604d1ee08bda43fa8daa957a19d2f7a3f768a11 Mon Sep 17 00:00:00 2001 From: Rankyn Bass Date: Thu, 1 Jun 2023 21:29:50 -0700 Subject: [PATCH 8/8] Update for Dxvk 2.2 --- lib/FFXIVQuickLauncher | 2 +- .../Components/SettingsPage/Tabs/SettingsTabDXVK.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/FFXIVQuickLauncher b/lib/FFXIVQuickLauncher index 26b704cd..62fee287 160000 --- a/lib/FFXIVQuickLauncher +++ b/lib/FFXIVQuickLauncher @@ -1 +1 @@ -Subproject commit 26b704cd828033c77bac08aae315f8fa028b306f +Subproject commit 62fee287329fe27cdf17106f562b2bf1ea3809c0 diff --git a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs index d3993878..28bf3008 100644 --- a/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs +++ b/src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabDXVK.cs @@ -20,17 +20,17 @@ public SettingsTabDXVK() { CheckWarning = type => { - if(type == Dxvk.DxvkVersion.v2_1) - return "AMD users may need to use env variable RADV_PERFTEST=gpl"; + if (new [] {Dxvk.DxvkVersion.v2_1, Dxvk.DxvkVersion.v2_2}.Contains(type)) + return "May not work with pre-8.0 or non-proton wine builds. AMD users may need to use env variable RADV_PERFTEST=gpl"; return null; }, }, new SettingsEntry("Enable DXVK ASYNC", "Enable DXVK ASYNC patch.", () => Program.Config.DxvkAsyncEnabled ?? true, b => Program.Config.DxvkAsyncEnabled = b) { - CheckVisibility = () => dxvkVersionSetting.Value != Dxvk.DxvkVersion.v2_1, + CheckVisibility = () => !(new [] {Dxvk.DxvkVersion.v2_1, Dxvk.DxvkVersion.v2_2}.Contains(dxvkVersionSetting.Value)), CheckWarning = b => { - if(!b && dxvkVersionSetting.Value == Dxvk.DxvkVersion.v2_0) + if (!b && dxvkVersionSetting.Value == Dxvk.DxvkVersion.v2_0) return "AMD users may need to use env variable RADV_PERFTEST=gpl"; return null; },