From 856838f7ce98cc4447f2d06b831de7962cf83de8 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 13 May 2023 00:31:31 -0400 Subject: [PATCH] vulkan_common: disable depth clamp dynamic state for older radv --- src/video_core/vulkan_common/vulkan_device.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 6ffca2af2..7132bae99 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -406,6 +406,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false; features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false; dynamic_state3_blending = false; + + const u32 version = (properties.properties.driverVersion << 3) >> 3; + if (version < VK_MAKE_API_VERSION(0, 23, 1, 0)) { + LOG_WARNING(Render_Vulkan, + "RADV versions older than 23.1.0 have broken depth clamp dynamic state"); + features.extended_dynamic_state3.extendedDynamicState3DepthClampEnable = false; + dynamic_state3_enables = false; + } } if (extensions.vertex_input_dynamic_state && is_radv) { // TODO(ameerj): Blacklist only offending driver versions