mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-22 16:17:53 +00:00
vulkan_device: Test depth stencil blit support by format
This commit is contained in:
parent
a8f6941fd6
commit
cc8aba1380
3 changed files with 47 additions and 29 deletions
|
@ -1043,15 +1043,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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue