TextureCache: Simplify blitting of D24S8 formats and fix bugs.
This commit is contained in:
parent
d7f4434bd5
commit
8532849439
10 changed files with 73 additions and 195 deletions
|
@ -1781,7 +1781,13 @@ void TextureCache<P>::CopyImage(ImageId dst_id, ImageId src_id, std::vector<Imag
|
|||
const SubresourceExtent src_extent{.levels = 1, .layers = 1};
|
||||
const SubresourceRange dst_range{.base = dst_base, .extent = dst_extent};
|
||||
const SubresourceRange src_range{.base = src_base, .extent = src_extent};
|
||||
const ImageViewInfo dst_view_info(ImageViewType::e2D, dst.info.format, dst_range);
|
||||
PixelFormat dst_format = dst.info.format;
|
||||
if (GetFormatType(src.info.format) == SurfaceType::DepthStencil &&
|
||||
GetFormatType(dst_format) == SurfaceType::ColorTexture &&
|
||||
BytesPerBlock(dst_format) == 4) {
|
||||
dst_format = PixelFormat::A8B8G8R8_UNORM;
|
||||
}
|
||||
const ImageViewInfo dst_view_info(ImageViewType::e2D, dst_format, dst_range);
|
||||
const ImageViewInfo src_view_info(ImageViewType::e2D, src.info.format, src_range);
|
||||
const auto [dst_framebuffer_id, dst_view_id] = RenderTargetFromImage(dst_id, dst_view_info);
|
||||
Framebuffer* const dst_framebuffer = &slot_framebuffers[dst_framebuffer_id];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue