diff options
author | Liam <byteslice@airmail.cc> | 2023-01-07 01:07:47 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-01-07 01:07:47 +0100 |
commit | 2e4dde12c7316a0bb5ab46da88601b7942013568 (patch) | |
tree | 0b7784185024cc6247878a3abbaf33b6d0b9ae7f /src | |
parent | Merge pull request #9567 from german77/antialias (diff) | |
download | yuzu-2e4dde12c7316a0bb5ab46da88601b7942013568.tar yuzu-2e4dde12c7316a0bb5ab46da88601b7942013568.tar.gz yuzu-2e4dde12c7316a0bb5ab46da88601b7942013568.tar.bz2 yuzu-2e4dde12c7316a0bb5ab46da88601b7942013568.tar.lz yuzu-2e4dde12c7316a0bb5ab46da88601b7942013568.tar.xz yuzu-2e4dde12c7316a0bb5ab46da88601b7942013568.tar.zst yuzu-2e4dde12c7316a0bb5ab46da88601b7942013568.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_vulkan/renderer_vulkan.cpp | 2 | ||||
-rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 12 | ||||
-rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 1578cb206..52855120c 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -110,7 +110,7 @@ RendererVulkan::RendererVulkan(Core::TelemetrySession& telemetry_session_, screen_info), rasterizer(render_window, gpu, cpu_memory, screen_info, device, memory_allocator, state_tracker, scheduler) { - if (Settings::values.renderer_force_max_clock.GetValue()) { + if (Settings::values.renderer_force_max_clock.GetValue() && device.ShouldBoostClocks()) { turbo_mode.emplace(instance, dld); } Report(); diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 77aee802d..902e67955 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -991,6 +991,18 @@ std::string Device::GetDriverName() const { } } +bool Device::ShouldBoostClocks() const { + const bool validated_driver = + driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE || + driver_id == VK_DRIVER_ID_MESA_RADV || driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY || + driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS || + driver_id == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA; + + const bool is_steam_deck = properties.vendorID == 0x1002 && properties.deviceID == 0x163F; + + return validated_driver && !is_steam_deck; +} + static std::vector<const char*> ExtensionsRequiredForInstanceVersion(u32 available_version) { std::vector<const char*> extensions{REQUIRED_EXTENSIONS.begin(), REQUIRED_EXTENSIONS.end()}; diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 6042046e1..4bc267163 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -106,6 +106,8 @@ public: return driver_id; } + bool ShouldBoostClocks() const; + /// Returns uniform buffer alignment requeriment. VkDeviceSize GetUniformBufferAlignment() const { return properties.limits.minUniformBufferOffsetAlignment; |