summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache/texture_cache.h
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-10-06 08:02:05 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:30 +0100
commitf8339cd703c2e6d24477be211e1fd91a6e1ef334 (patch)
treef02b34bbbbbabe6a5c1f4a8a7cdacbe13a39731f /src/video_core/texture_cache/texture_cache.h
parentvideo_core: Misc resolution scaling related refactoring (diff)
downloadyuzu-f8339cd703c2e6d24477be211e1fd91a6e1ef334.tar
yuzu-f8339cd703c2e6d24477be211e1fd91a6e1ef334.tar.gz
yuzu-f8339cd703c2e6d24477be211e1fd91a6e1ef334.tar.bz2
yuzu-f8339cd703c2e6d24477be211e1fd91a6e1ef334.tar.lz
yuzu-f8339cd703c2e6d24477be211e1fd91a6e1ef334.tar.xz
yuzu-f8339cd703c2e6d24477be211e1fd91a6e1ef334.tar.zst
yuzu-f8339cd703c2e6d24477be211e1fd91a6e1ef334.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/texture_cache/texture_cache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 630c73005..de522cc43 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -857,7 +857,7 @@ u64 TextureCache<P>::GetScaledImageSizeBytes(Image& image) {
const f32 add_to_size = Settings::values.resolution_info.up_factor - 1.0f;
const bool sign = std::signbit(add_to_size);
const u32 image_size_bytes = std::max(image.guest_size_bytes, image.unswizzled_size_bytes);
- const u64 tentative_size = static_cast<u64>(image_size_bytes * std::abs(add_to_size));
+ const u64 tentative_size = image_size_bytes * static_cast<u32>(std::abs(add_to_size));
const u64 fitted_size = Common::AlignUp(tentative_size, 1024);
return sign ? -fitted_size : fitted_size;
}