diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-10-17 01:22:13 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:31 +0100 |
commit | ef1dc4263586f5b81b53a5158db2c1cd2086ed4c (patch) | |
tree | 5fc6d6b3323151961f25c557584177790ad37227 /src/video_core/renderer_vulkan/vk_texture_cache.cpp | |
parent | vulkan: Fix rescaling push constant usage (diff) | |
download | yuzu-ef1dc4263586f5b81b53a5158db2c1cd2086ed4c.tar yuzu-ef1dc4263586f5b81b53a5158db2c1cd2086ed4c.tar.gz yuzu-ef1dc4263586f5b81b53a5158db2c1cd2086ed4c.tar.bz2 yuzu-ef1dc4263586f5b81b53a5158db2c1cd2086ed4c.tar.lz yuzu-ef1dc4263586f5b81b53a5158db2c1cd2086ed4c.tar.xz yuzu-ef1dc4263586f5b81b53a5158db2c1cd2086ed4c.tar.zst yuzu-ef1dc4263586f5b81b53a5158db2c1cd2086ed4c.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_texture_cache.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_texture_cache.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 9b90c7d9b..a4fbbc735 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -1126,6 +1126,7 @@ bool Image::ScaleUp() { return false; } ASSERT(info.type != ImageType::Linear); + flags |= ImageFlagBits::Rescaled; const auto& resolution = runtime->resolution; if (!resolution.active) { return false; @@ -1188,11 +1189,11 @@ bool Image::ScaleUp() { dst_region, src_region, Tegra::Engines::Fermi2D::Filter::Point, BLIT_OPERATION); } else { // TODO: Use helper blits where applicable + flags &= ~ImageFlagBits::Rescaled; LOG_ERROR(Render_Vulkan, "Device does not support scaling format {}", format); return false; } } - flags |= ImageFlagBits::Rescaled; return true; } @@ -1200,8 +1201,12 @@ bool Image::ScaleDown() { if (False(flags & ImageFlagBits::Rescaled)) { return false; } - ASSERT(info.type != ImageType::Linear); flags &= ~ImageFlagBits::Rescaled; + const auto& resolution = runtime->resolution; + if (!resolution.active) { + return false; + } + ASSERT(info.type != ImageType::Linear); current_image = *original_image; return true; } |