aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/vulkan_common/vulkan_device.cpp
diff options
context:
space:
mode:
authorcrueter <crueter@eden-emu.dev>2025-12-30 18:03:09 +0100
committercrueter <crueter@eden-emu.dev>2025-12-30 18:03:09 +0100
commite4cbcec2f10b1d03626eb0c79971eb6272fd6e87 (patch)
tree5514b04206e0ac76ebde0132b89473b2b9700606 /src/video_core/vulkan_common/vulkan_device.cpp
parent006f97f207acd7d5fb5c32318f059c0929252511 (diff)
[settings, frontend] Reorganize graphics/CPU settings, saner defaults (#3233)
- Fast GPU now defaults to 256, removed 128 since it's useless. - Completely reorganized graphics and CPU settings on both platforms. Also got rid of Eden's Veil - Merged some "use ..." settings that weren't really necessary. - Changed ExtendedDynamicState to be a combo box Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3233 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_device.cpp')
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index 524b93dfdf..3fc56d35d6 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -17,6 +17,7 @@
#include "common/literals.h"
#include <ranges>
#include "common/settings.h"
+#include "common/settings_enums.h"
#include "video_core/vulkan_common/nsight_aftermath_tracker.h"
#include "video_core/vulkan_common/vma.h"
#include "video_core/vulkan_common/vulkan_device.h"
@@ -418,12 +419,15 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
const VkDriverId driver_id = properties.driver.driverID;
const auto device_id = properties.properties.deviceID;
+
const bool is_radv = driver_id == VK_DRIVER_ID_MESA_RADV;
const bool is_amd_driver =
driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE;
const bool is_amd = is_amd_driver || is_radv;
+
const bool is_intel_windows = driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS;
const bool is_intel_anv = driver_id == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA;
+
const bool is_nvidia = driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY;
const bool is_mvk = driver_id == VK_DRIVER_ID_MOLTENVK;
const bool is_qualcomm = driver_id == VK_DRIVER_ID_QUALCOMM_PROPRIETARY;
@@ -483,6 +487,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
is_non_gpu = properties.properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_OTHER ||
properties.properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU;
+ const bool is_intel_igpu = is_integrated && (is_intel_anv || is_intel_windows);
+
supports_d24_depth =
IsFormatSupported(VK_FORMAT_D24_UNORM_S8_UINT,
VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, FormatType::Optimal);
@@ -662,16 +668,18 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
dynamic_state3_enables = false;
}
+ const auto dyna_state = u32(Settings::values.dyna_state.GetValue());
+
// Mesa Intel drivers on UHD 620 have broken EDS causing extreme flickering - unknown if it affects other iGPUs
// ALSO affects ALL versions of UHD drivers on Windows 10+, seems to cause even worse issues like straight up crashing
// So... Yeah, UHD drivers fucking suck -- maybe one day we can work past this, maybe; some driver hacking?
// And then we can rest in peace by doing `< VK_MAKE_API_VERSION(26, 0, 0)` for our beloved mesa drivers... one day
- if ((is_mvk || (is_integrated && is_intel_anv) || (is_integrated && is_intel_windows)) && Settings::values.dyna_state.GetValue() != 0) {
+ if ((is_mvk || is_intel_igpu) && dyna_state != 0) {
LOG_WARNING(Render_Vulkan, "Driver has broken dynamic state, forcing to 0 to prevent graphical issues");
- Settings::values.dyna_state.SetValue(0);
+ Settings::values.dyna_state.SetValue(Settings::ExtendedDynamicState::Disabled);
}
- switch (Settings::values.dyna_state.GetValue()) {
+ switch (dyna_state) {
case 0:
RemoveExtensionFeature(extensions.extended_dynamic_state, features.extended_dynamic_state, VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME);
[[fallthrough]];