diff options
| author | 2023-07-31 19:11:24 -0400 | |
|---|---|---|
| committer | 2023-07-31 19:14:20 -0400 | |
| commit | d31676935e0842680e37a4e5005f0ee8d66021fd (patch) | |
| tree | 8f5673b5b5136b6ff6fa6062cbe9da90edefd876 /src/video_core/renderer_vulkan | |
| parent | vulkan_device: Return true if either depth/stencil format supports blit (diff) | |
| download | yuzu-d31676935e0842680e37a4e5005f0ee8d66021fd.tar.gz yuzu-d31676935e0842680e37a4e5005f0ee8d66021fd.tar.xz yuzu-d31676935e0842680e37a4e5005f0ee8d66021fd.zip | |
vulkan_device: Test depth stencil blit support by format
Diffstat (limited to 'src/video_core/renderer_vulkan')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_texture_cache.cpp | 16 |
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 bf6ad6c79..ed048f7b8 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp | |||
| @@ -1043,15 +1043,27 @@ void TextureCacheRuntime::BlitImage(Framebuffer* dst_framebuffer, ImageView& dst | |||
| 1043 | dst_region, src_region, filter, operation); | 1043 | dst_region, src_region, filter, operation); |
| 1044 | return; | 1044 | return; |
| 1045 | } | 1045 | } |
| 1046 | ASSERT(src.format == dst.format); | ||
| 1046 | if (aspect_mask == (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) { | 1047 | if (aspect_mask == (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) { |
| 1047 | if (!device.IsBlitDepthStencilSupported()) { | 1048 | const auto format = src.format; |
| 1049 | const auto can_blit_depth_stencil = [this, format] { | ||
| 1050 | switch (format) { | ||
| 1051 | case VideoCore::Surface::PixelFormat::D24_UNORM_S8_UINT: | ||
| 1052 | case VideoCore::Surface::PixelFormat::S8_UINT_D24_UNORM: | ||
| 1053 | return device.IsBlitDepth24Stencil8Supported(); | ||
| 1054 | case VideoCore::Surface::PixelFormat::D32_FLOAT_S8_UINT: | ||
| 1055 | return device.IsBlitDepth32Stencil8Supported(); | ||
| 1056 | default: | ||
| 1057 | UNREACHABLE(); | ||
| 1058 | } | ||
| 1059 | }(); | ||
| 1060 | if (!can_blit_depth_stencil) { | ||
| 1048 | UNIMPLEMENTED_IF(is_src_msaa || is_dst_msaa); | 1061 | UNIMPLEMENTED_IF(is_src_msaa || is_dst_msaa); |
| 1049 | blit_image_helper.BlitDepthStencil(dst_framebuffer, src.DepthView(), src.StencilView(), | 1062 | blit_image_helper.BlitDepthStencil(dst_framebuffer, src.DepthView(), src.StencilView(), |
| 1050 | dst_region, src_region, filter, operation); | 1063 | dst_region, src_region, filter, operation); |
| 1051 | return; | 1064 | return; |
| 1052 | } | 1065 | } |
| 1053 | } | 1066 | } |
| 1054 | ASSERT(src.format == dst.format); | ||
| 1055 | ASSERT(!(is_dst_msaa && !is_src_msaa)); | 1067 | ASSERT(!(is_dst_msaa && !is_src_msaa)); |
| 1056 | ASSERT(operation == Fermi2D::Operation::SrcCopy); | 1068 | ASSERT(operation == Fermi2D::Operation::SrcCopy); |
| 1057 | 1069 | ||