mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-20 20:03:22 +02:00
Merge pull request #4772 from goldenx86/block-rdna
vk_device: Block VK_EXT_extended_dynamic_state for RDNA devices
This commit is contained in:
commit
d47ac3ce09
@ -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(
|
std::unordered_map<VkFormat, VkFormatProperties> GetFormatProperties(
|
||||||
vk::PhysicalDevice physical, const vk::InstanceDispatch& dld) {
|
vk::PhysicalDevice physical, const vk::InstanceDispatch& dld) {
|
||||||
static constexpr std::array formats{
|
static constexpr std::array formats{
|
||||||
@ -388,6 +403,15 @@ bool VKDevice::Create() {
|
|||||||
|
|
||||||
CollectTelemetryParameters();
|
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);
|
graphics_queue = logical.GetQueue(graphics_family);
|
||||||
present_queue = logical.GetQueue(present_family);
|
present_queue = logical.GetQueue(present_family);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user