summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-09-24 16:50:04 +0200
committerGitHub <noreply@github.com>2023-09-24 16:50:04 +0200
commitb3569092124136433b5a38586dbc8ca8512406eb (patch)
treed3d9c67331bd345a5acb0ae78225b8518f8d2291 /src/video_core/renderer_vulkan
parentMerge pull request #11567 from liamwhite/fixing-my-error (diff)
parentvulkan_device: Test depth stencil blit support by format (diff)
downloadyuzu-b3569092124136433b5a38586dbc8ca8512406eb.tar
yuzu-b3569092124136433b5a38586dbc8ca8512406eb.tar.gz
yuzu-b3569092124136433b5a38586dbc8ca8512406eb.tar.bz2
yuzu-b3569092124136433b5a38586dbc8ca8512406eb.tar.lz
yuzu-b3569092124136433b5a38586dbc8ca8512406eb.tar.xz
yuzu-b3569092124136433b5a38586dbc8ca8512406eb.tar.zst
yuzu-b3569092124136433b5a38586dbc8ca8512406eb.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index 285a50ea4..f25842476 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -1049,15 +1049,27 @@ void TextureCacheRuntime::BlitImage(Framebuffer* dst_framebuffer, ImageView& dst
dst_region, src_region, filter, operation);
return;
}
+ ASSERT(src.format == dst.format);
if (aspect_mask == (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
- if (!device.IsBlitDepthStencilSupported()) {
+ const auto format = src.format;
+ const auto can_blit_depth_stencil = [this, format] {
+ switch (format) {
+ case VideoCore::Surface::PixelFormat::D24_UNORM_S8_UINT:
+ case VideoCore::Surface::PixelFormat::S8_UINT_D24_UNORM:
+ return device.IsBlitDepth24Stencil8Supported();
+ case VideoCore::Surface::PixelFormat::D32_FLOAT_S8_UINT:
+ return device.IsBlitDepth32Stencil8Supported();
+ default:
+ UNREACHABLE();
+ }
+ }();
+ if (!can_blit_depth_stencil) {
UNIMPLEMENTED_IF(is_src_msaa || is_dst_msaa);
blit_image_helper.BlitDepthStencil(dst_framebuffer, src.DepthView(), src.StencilView(),
dst_region, src_region, filter, operation);
return;
}
}
- ASSERT(src.format == dst.format);
ASSERT(!(is_dst_msaa && !is_src_msaa));
ASSERT(operation == Fermi2D::Operation::SrcCopy);