diff options
author | goldenx86 <matias.locatti@gmail.com> | 2020-10-09 02:17:08 +0200 |
---|---|---|
committer | goldenx86 <matias.locatti@gmail.com> | 2020-10-09 02:27:49 +0200 |
commit | 0120e5b1d97f1ebbdd23eed359804221eb697ad2 (patch) | |
tree | 9a20423d342753c3e6a18cea478f9f724ed51aaa | |
parent | Merge pull request #4677 from german77/ShakeFromButton (diff) | |
download | yuzu-0120e5b1d97f1ebbdd23eed359804221eb697ad2.tar yuzu-0120e5b1d97f1ebbdd23eed359804221eb697ad2.tar.gz yuzu-0120e5b1d97f1ebbdd23eed359804221eb697ad2.tar.bz2 yuzu-0120e5b1d97f1ebbdd23eed359804221eb697ad2.tar.lz yuzu-0120e5b1d97f1ebbdd23eed359804221eb697ad2.tar.xz yuzu-0120e5b1d97f1ebbdd23eed359804221eb697ad2.tar.zst yuzu-0120e5b1d97f1ebbdd23eed359804221eb697ad2.zip |
-rw-r--r-- | src/video_core/renderer_vulkan/vk_device.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_device.cpp b/src/video_core/renderer_vulkan/vk_device.cpp index 3d8d3213d..1f057b43b 100644 --- a/src/video_core/renderer_vulkan/vk_device.cpp +++ b/src/video_core/renderer_vulkan/vk_device.cpp @@ -79,6 +79,21 @@ VkFormatFeatureFlags GetFormatFeatures(VkFormatProperties properties, FormatType } } +[[nodiscard]] bool IsRDNA(std::string_view device_name, VkDriverIdKHR driver_id) { + static constexpr std::array RDNA_DEVICES{ + "5700", + "5600", + "5500", + "5300", + }; + if (driver_id != VK_DRIVER_ID_AMD_PROPRIETARY_KHR) { + return false; + } + return std::any_of(RDNA_DEVICES.begin(), RDNA_DEVICES.end(), [device_name](const char* name) { + return device_name.find(name) != std::string_view::npos; + }); +} + std::unordered_map<VkFormat, VkFormatProperties> GetFormatProperties( vk::PhysicalDevice physical, const vk::InstanceDispatch& dld) { static constexpr std::array formats{ @@ -388,6 +403,15 @@ bool VKDevice::Create() { CollectTelemetryParameters(); + if (ext_extended_dynamic_state && IsRDNA(properties.deviceName, driver_id)) { + // AMD's proprietary driver supports VK_EXT_extended_dynamic_state but on RDNA devices it + // seems to cause stability issues + LOG_WARNING( + Render_Vulkan, + "Blacklisting AMD proprietary on RDNA devices from VK_EXT_extended_dynamic_state"); + ext_extended_dynamic_state = false; + } + graphics_queue = logical.GetQueue(graphics_family); present_queue = logical.GetQueue(present_family); |