aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache/surface_base.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-05-24 11:59:23 -0400
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-20 21:38:33 -0300
commit92513541529e90f4f79a1f2c3f8ccf5a199e4c20 (patch)
treed686a78d8af4e41bf6a7c3fc2136e146b98f42e4 /src/video_core/texture_cache/surface_base.h
parent0966665fc225eee29b3ed87baefd74f79c19d307 (diff)
texture_cache: Correct copying between compressed and uncompressed formats
Diffstat (limited to 'src/video_core/texture_cache/surface_base.h')
-rw-r--r--src/video_core/texture_cache/surface_base.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/video_core/texture_cache/surface_base.h b/src/video_core/texture_cache/surface_base.h
index dacbc97c7..77c2d6758 100644
--- a/src/video_core/texture_cache/surface_base.h
+++ b/src/video_core/texture_cache/surface_base.h
@@ -235,9 +235,8 @@ private:
for (u32 layer = 0; layer < layers; layer++) {
for (u32 level = 0; level < mipmaps; level++) {
- const u32 width{std::min(params.GetMipWidth(level), in_params.GetMipWidth(level))};
- const u32 height{
- std::min(params.GetMipHeight(level), in_params.GetMipHeight(level))};
+ const u32 width = SurfaceParams::IntersectWidth(params, in_params, level, level);
+ const u32 height = SurfaceParams::IntersectHeight(params, in_params, level, level);
result.emplace_back(width, height, layer, level);
}
}
@@ -250,8 +249,8 @@ private:
result.reserve(mipmaps);
for (u32 level = 0; level < mipmaps; level++) {
- const u32 width{std::min(params.GetMipWidth(level), in_params.GetMipWidth(level))};
- const u32 height{std::min(params.GetMipHeight(level), in_params.GetMipHeight(level))};
+ const u32 width = SurfaceParams::IntersectWidth(params, in_params, level, level);
+ const u32 height = SurfaceParams::IntersectHeight(params, in_params, level, level);
const u32 depth{std::min(params.GetMipDepth(level), in_params.GetMipDepth(level))};
result.emplace_back(width, height, depth, level);
}