From eabc2e83c025d6b76ba297fe0a8ffc5cf640f20d Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Sat, 5 Oct 2024 12:13:36 -0700 Subject: [PATCH] vulkan: Account for fallbacks when setting depth attachment format. --- src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 0ccaf3fac..955393b54 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -211,7 +211,9 @@ bool PipelineCache::RefreshGraphicsKey() { key.depth_bias_enable = regs.polygon_control.NeedsBias(); const auto& db = regs.depth_buffer; - const auto ds_format = LiverpoolToVK::DepthFormat(db.z_info.format, db.stencil_info.format); + const auto ds_format = instance.GetSupportedFormat( + LiverpoolToVK::DepthFormat(db.z_info.format, db.stencil_info.format), + vk::FormatFeatureFlagBits2::eDepthStencilAttachment); if (db.z_info.format != AmdGpu::Liverpool::DepthBuffer::ZFormat::Invalid) { key.depth_format = ds_format; } else {