diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-04-15 13:43:27 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-10-06 21:00:53 +0200 |
commit | 8fd1d769fe1c079d3a3f1ddc531233eabf0dd7ba (patch) | |
tree | 3565744222ebe3565a65179ae8797c234519a7be /src/video_core | |
parent | General: Fix compilation for GCC (diff) | |
download | yuzu-8fd1d769fe1c079d3a3f1ddc531233eabf0dd7ba.tar yuzu-8fd1d769fe1c079d3a3f1ddc531233eabf0dd7ba.tar.gz yuzu-8fd1d769fe1c079d3a3f1ddc531233eabf0dd7ba.tar.bz2 yuzu-8fd1d769fe1c079d3a3f1ddc531233eabf0dd7ba.tar.lz yuzu-8fd1d769fe1c079d3a3f1ddc531233eabf0dd7ba.tar.xz yuzu-8fd1d769fe1c079d3a3f1ddc531233eabf0dd7ba.tar.zst yuzu-8fd1d769fe1c079d3a3f1ddc531233eabf0dd7ba.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/texture_cache/image_base.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/video_core/texture_cache/image_base.cpp b/src/video_core/texture_cache/image_base.cpp index f61e09ac7..91512022f 100644 --- a/src/video_core/texture_cache/image_base.cpp +++ b/src/video_core/texture_cache/image_base.cpp @@ -7,6 +7,7 @@ #include <vector> #include "common/common_types.h" +#include "common/div_ceil.h" #include "video_core/surface.h" #include "video_core/texture_cache/formatter.h" #include "video_core/texture_cache/image_base.h" @@ -182,10 +183,6 @@ void AddImageAlias(ImageBase& lhs, ImageBase& rhs, ImageId lhs_id, ImageId rhs_i }; const bool is_lhs_compressed = lhs_block.width > 1 || lhs_block.height > 1; const bool is_rhs_compressed = rhs_block.width > 1 || rhs_block.height > 1; - if (is_lhs_compressed && is_rhs_compressed) { - LOG_ERROR(HW_GPU, "Compressed to compressed image aliasing is not implemented"); - return; - } const s32 lhs_mips = lhs.info.resources.levels; const s32 rhs_mips = rhs.info.resources.levels; const s32 num_mips = std::min(lhs_mips - base->level, rhs_mips); @@ -199,12 +196,12 @@ void AddImageAlias(ImageBase& lhs, ImageBase& rhs, ImageId lhs_id, ImageId rhs_i Extent3D lhs_size = MipSize(lhs.info.size, base->level + mip_level); Extent3D rhs_size = MipSize(rhs.info.size, mip_level); if (is_lhs_compressed) { - lhs_size.width /= lhs_block.width; - lhs_size.height /= lhs_block.height; + lhs_size.width = Common::DivCeil(lhs_size.width, lhs_block.width); + lhs_size.height = Common::DivCeil(lhs_size.height, lhs_block.height); } if (is_rhs_compressed) { - rhs_size.width /= rhs_block.width; - rhs_size.height /= rhs_block.height; + rhs_size.width = Common::DivCeil(rhs_size.width, rhs_block.width); + rhs_size.height = Common::DivCeil(rhs_size.height, rhs_block.height); } const Extent3D copy_size{ .width = std::min(lhs_size.width, rhs_size.width), |