diff options
| author | 2023-09-24 10:50:04 -0400 | |
|---|---|---|
| committer | 2023-09-24 10:50:04 -0400 | |
| commit | b3569092124136433b5a38586dbc8ca8512406eb (patch) | |
| tree | d3d9c67331bd345a5acb0ae78225b8518f8d2291 /src/video_core/renderer_vulkan | |
| parent | Merge pull request #11567 from liamwhite/fixing-my-error (diff) | |
| parent | vulkan_device: Test depth stencil blit support by format (diff) | |
| download | yuzu-b3569092124136433b5a38586dbc8ca8512406eb.tar.gz yuzu-b3569092124136433b5a38586dbc8ca8512406eb.tar.xz yuzu-b3569092124136433b5a38586dbc8ca8512406eb.zip | |
Merge pull request #11165 from Morph1984/ds_blit
vulkan_device: Return true if either depth/stencil format supports blit
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 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 | |||
| 1049 | dst_region, src_region, filter, operation); | 1049 | dst_region, src_region, filter, operation); |
| 1050 | return; | 1050 | return; |
| 1051 | } | 1051 | } |
| 1052 | ASSERT(src.format == dst.format); | ||
| 1052 | if (aspect_mask == (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) { | 1053 | if (aspect_mask == (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) { |
| 1053 | if (!device.IsBlitDepthStencilSupported()) { | 1054 | const auto format = src.format; |
| 1055 | const auto can_blit_depth_stencil = [this, format] { | ||
| 1056 | switch (format) { | ||
| 1057 | case VideoCore::Surface::PixelFormat::D24_UNORM_S8_UINT: | ||
| 1058 | case VideoCore::Surface::PixelFormat::S8_UINT_D24_UNORM: | ||
| 1059 | return device.IsBlitDepth24Stencil8Supported(); | ||
| 1060 | case VideoCore::Surface::PixelFormat::D32_FLOAT_S8_UINT: | ||
| 1061 | return device.IsBlitDepth32Stencil8Supported(); | ||
| 1062 | default: | ||
| 1063 | UNREACHABLE(); | ||
| 1064 | } | ||
| 1065 | }(); | ||
| 1066 | if (!can_blit_depth_stencil) { | ||
| 1054 | UNIMPLEMENTED_IF(is_src_msaa || is_dst_msaa); | 1067 | UNIMPLEMENTED_IF(is_src_msaa || is_dst_msaa); |
| 1055 | blit_image_helper.BlitDepthStencil(dst_framebuffer, src.DepthView(), src.StencilView(), | 1068 | blit_image_helper.BlitDepthStencil(dst_framebuffer, src.DepthView(), src.StencilView(), |
| 1056 | dst_region, src_region, filter, operation); | 1069 | dst_region, src_region, filter, operation); |
| 1057 | return; | 1070 | return; |
| 1058 | } | 1071 | } |
| 1059 | } | 1072 | } |
| 1060 | ASSERT(src.format == dst.format); | ||
| 1061 | ASSERT(!(is_dst_msaa && !is_src_msaa)); | 1073 | ASSERT(!(is_dst_msaa && !is_src_msaa)); |
| 1062 | ASSERT(operation == Fermi2D::Operation::SrcCopy); | 1074 | ASSERT(operation == Fermi2D::Operation::SrcCopy); |
| 1063 | 1075 | ||