diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-07-20 07:40:05 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:27 +0100 |
commit | 84f2aea8962146be899131b032fcdf9b4e1f6ddf (patch) | |
tree | d6db3d9be0e24c045ef39fe0f53b8b6f6da0cfef /src/video_core/renderer_vulkan | |
parent | gl_texture_cache: WIP texture rescale (diff) | |
download | yuzu-84f2aea8962146be899131b032fcdf9b4e1f6ddf.tar yuzu-84f2aea8962146be899131b032fcdf9b4e1f6ddf.tar.gz yuzu-84f2aea8962146be899131b032fcdf9b4e1f6ddf.tar.bz2 yuzu-84f2aea8962146be899131b032fcdf9b4e1f6ddf.tar.lz yuzu-84f2aea8962146be899131b032fcdf9b4e1f6ddf.tar.xz yuzu-84f2aea8962146be899131b032fcdf9b4e1f6ddf.tar.zst yuzu-84f2aea8962146be899131b032fcdf9b4e1f6ddf.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_texture_cache.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 668554d1e..5fd190825 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -1078,6 +1078,10 @@ bool Image::ScaleUp(bool save_as_backup) { MemoryCommit new_commit( runtime->memory_allocator.Commit(rescaled_image, MemoryUsage::DeviceLocal)); + if (aspect_mask == 0) { + aspect_mask = ImageAspectMask(info.format); + } + const auto scale_up = [&](u32 value) { return (value * resolution.up_scale) >> resolution.down_shift; }; @@ -1170,6 +1174,10 @@ bool Image::ScaleDown(bool save_as_backup) { return (value * resolution.up_scale) >> resolution.down_shift; }; + if (aspect_mask == 0) { + aspect_mask = ImageAspectMask(info.format); + } + const bool is_2d = info.type == ImageType::e2D; boost::container::small_vector<VkImageBlit, 4> vkRegions(info.resources.levels); for (s32 level = 0; level < info.resources.levels; level++) { |