diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-11-21 07:58:49 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-12-05 21:42:45 +0100 |
commit | 218d790bd6079af109474dd6be642eb8d01bbe0e (patch) | |
tree | 8faf6f2aaf70e6d3a1d8bd1f26cf080dcd6f6d07 /src/video_core/texture_cache/texture_cache.h | |
parent | blit_image: Refactor upscale factors usage (diff) | |
download | yuzu-218d790bd6079af109474dd6be642eb8d01bbe0e.tar yuzu-218d790bd6079af109474dd6be642eb8d01bbe0e.tar.gz yuzu-218d790bd6079af109474dd6be642eb8d01bbe0e.tar.bz2 yuzu-218d790bd6079af109474dd6be642eb8d01bbe0e.tar.lz yuzu-218d790bd6079af109474dd6be642eb8d01bbe0e.tar.xz yuzu-218d790bd6079af109474dd6be642eb8d01bbe0e.tar.zst yuzu-218d790bd6079af109474dd6be642eb8d01bbe0e.zip |
Diffstat (limited to 'src/video_core/texture_cache/texture_cache.h')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 43ebf4ce1..6a161f21c 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -1847,7 +1847,18 @@ void TextureCache<P>::CopyImage(ImageId dst_id, ImageId src_id, std::vector<Imag .height = std::min(dst_view.size.height, src_view.size.height), .depth = std::min(dst_view.size.depth, src_view.size.depth), }; - UNIMPLEMENTED_IF(copy.extent != expected_size); + const Extent3D scaled_extent = [is_rescaled, expected_size]() { + if (!is_rescaled) { + return expected_size; + } + const auto& resolution = Settings::values.resolution_info; + return Extent3D{ + .width = resolution.ScaleUp(expected_size.width), + .height = resolution.ScaleUp(expected_size.height), + .depth = expected_size.depth, + }; + }(); + UNIMPLEMENTED_IF(copy.extent != scaled_extent); runtime.ConvertImage(dst_framebuffer, dst_view, src_view); } |