diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-21 05:32:34 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-21 05:37:01 +0100 |
commit | 779f4ac72d2ea2788c2106c8d2d1ec0e01b77b81 (patch) | |
tree | 035e612bd819dd191ce79046c2e5900fccbfbeba /src/video_core/texture_cache/util.cpp | |
parent | Merge pull request #7368 from FernandoS27/vulkan-conv (diff) | |
download | yuzu-779f4ac72d2ea2788c2106c8d2d1ec0e01b77b81.tar yuzu-779f4ac72d2ea2788c2106c8d2d1ec0e01b77b81.tar.gz yuzu-779f4ac72d2ea2788c2106c8d2d1ec0e01b77b81.tar.bz2 yuzu-779f4ac72d2ea2788c2106c8d2d1ec0e01b77b81.tar.lz yuzu-779f4ac72d2ea2788c2106c8d2d1ec0e01b77b81.tar.xz yuzu-779f4ac72d2ea2788c2106c8d2d1ec0e01b77b81.tar.zst yuzu-779f4ac72d2ea2788c2106c8d2d1ec0e01b77b81.zip |
Diffstat (limited to 'src/video_core/texture_cache/util.cpp')
-rw-r--r-- | src/video_core/texture_cache/util.cpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index e4d82631e..777503488 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp @@ -1152,36 +1152,14 @@ bool IsSubresource(const ImageInfo& candidate, const ImageBase& image, GPUVAddr void DeduceBlitImages(ImageInfo& dst_info, ImageInfo& src_info, const ImageBase* dst, const ImageBase* src) { bool is_resolve = false; - const auto original_src_format = src_info.format; - const auto original_dst_format = dst_info.format; if (src) { - if (GetFormatType(src->info.format) != SurfaceType::ColorTexture) { - src_info.format = src->info.format; - } is_resolve = src->info.num_samples > 1; src_info.num_samples = src->info.num_samples; src_info.size = src->info.size; } - if (dst && GetFormatType(dst->info.format) != SurfaceType::ColorTexture) { - dst_info.format = dst->info.format; - } - if (src && GetFormatType(src->info.format) != SurfaceType::ColorTexture) { - if (dst) { - if (GetFormatType(dst->info.format) == SurfaceType::ColorTexture) { - src_info.format = original_src_format; - } - } else { - dst_info.format = src->info.format; - } - } - if (dst && GetFormatType(dst->info.format) != SurfaceType::ColorTexture) { - if (src) { - if (GetFormatType(src->info.format) == SurfaceType::ColorTexture) { - dst_info.format = original_dst_format; - } - } else { - src_info.format = dst->info.format; - } + if (dst) { + dst_info.num_samples = dst->info.num_samples; + dst_info.size = dst->info.size; } ASSERT(!is_resolve || dst_info.format == src_info.format); } |