Vulkan: Don't use an unrestricted depth range on a 24-bit depth buffer.

This commit is contained in:
Jules Blok 2024-10-05 14:55:33 +02:00
parent e0fe72bfc0
commit 32521d1536

View File

@ -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;
}