From 32521d1536cf2a81fea6a71974b07a390c313457 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Sat, 5 Oct 2024 14:55:33 +0200 Subject: [PATCH] Vulkan: Don't use an unrestricted depth range on a 24-bit depth buffer. --- Source/Core/VideoBackends/Vulkan/VulkanContext.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp index d9da0d17e9..ee2f104efd 100644 --- a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp +++ b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp @@ -678,9 +678,12 @@ bool VulkanContext::SelectDeviceExtensions(bool enable_surface) AddExtension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, false); AddExtension(VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, false); - g_Config.backend_info.bSupportsUnrestrictedDepthRange = AddExtension(VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME, false); + if (!DriverDetails::HasBug(DriverDetails::BUG_BROKEN_D32F_CLEAR)) + g_Config.backend_info.bSupportsUnrestrictedDepthRange = + AddExtension(VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME, false); if (g_Config.backend_info.bSupportsUnrestrictedDepthRange) - g_Config.backend_info.bSupportsDepthClampControl = AddExtension(VK_EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME, false); + g_Config.backend_info.bSupportsDepthClampControl = + AddExtension(VK_EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME, false); return true; }