diff options
| author | 2023-01-06 19:07:47 -0500 | |
|---|---|---|
| committer | 2023-01-06 19:07:47 -0500 | |
| commit | 2e4dde12c7316a0bb5ab46da88601b7942013568 (patch) | |
| tree | 0b7784185024cc6247878a3abbaf33b6d0b9ae7f /src/video_core/vulkan_common | |
| parent | Merge pull request #9567 from german77/antialias (diff) | |
| download | yuzu-2e4dde12c7316a0bb5ab46da88601b7942013568.tar.gz yuzu-2e4dde12c7316a0bb5ab46da88601b7942013568.tar.xz yuzu-2e4dde12c7316a0bb5ab46da88601b7942013568.zip | |
renderer_vulkan: disable clock boost on unvalidated devices
Diffstat (limited to 'src/video_core/vulkan_common')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 12 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 2 |
2 files changed, 14 insertions, 0 deletions
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 { | |||
| 991 | } | 991 | } |
| 992 | } | 992 | } |
| 993 | 993 | ||
| 994 | bool Device::ShouldBoostClocks() const { | ||
| 995 | const bool validated_driver = | ||
| 996 | driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE || | ||
| 997 | driver_id == VK_DRIVER_ID_MESA_RADV || driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY || | ||
| 998 | driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS || | ||
| 999 | driver_id == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA; | ||
| 1000 | |||
| 1001 | const bool is_steam_deck = properties.vendorID == 0x1002 && properties.deviceID == 0x163F; | ||
| 1002 | |||
| 1003 | return validated_driver && !is_steam_deck; | ||
| 1004 | } | ||
| 1005 | |||
| 994 | static std::vector<const char*> ExtensionsRequiredForInstanceVersion(u32 available_version) { | 1006 | static std::vector<const char*> ExtensionsRequiredForInstanceVersion(u32 available_version) { |
| 995 | std::vector<const char*> extensions{REQUIRED_EXTENSIONS.begin(), REQUIRED_EXTENSIONS.end()}; | 1007 | std::vector<const char*> extensions{REQUIRED_EXTENSIONS.begin(), REQUIRED_EXTENSIONS.end()}; |
| 996 | 1008 | ||
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: | |||
| 106 | return driver_id; | 106 | return driver_id; |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | bool ShouldBoostClocks() const; | ||
| 110 | |||
| 109 | /// Returns uniform buffer alignment requeriment. | 111 | /// Returns uniform buffer alignment requeriment. |
| 110 | VkDeviceSize GetUniformBufferAlignment() const { | 112 | VkDeviceSize GetUniformBufferAlignment() const { |
| 111 | return properties.limits.minUniformBufferOffsetAlignment; | 113 | return properties.limits.minUniformBufferOffsetAlignment; |