summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-05-21 13:56:53 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:38:33 +0200
commitfcac55d5bff025fee822c2e7b0e06cdc178143dc (patch)
treec7a15716d3f2fac94717e879ee2f23ccd2e8c185 /src/video_core
parenttexture_cache: Fermi2D reform and implement View Mirage (diff)
downloadyuzu-fcac55d5bff025fee822c2e7b0e06cdc178143dc.tar
yuzu-fcac55d5bff025fee822c2e7b0e06cdc178143dc.tar.gz
yuzu-fcac55d5bff025fee822c2e7b0e06cdc178143dc.tar.bz2
yuzu-fcac55d5bff025fee822c2e7b0e06cdc178143dc.tar.lz
yuzu-fcac55d5bff025fee822c2e7b0e06cdc178143dc.tar.xz
yuzu-fcac55d5bff025fee822c2e7b0e06cdc178143dc.tar.zst
yuzu-fcac55d5bff025fee822c2e7b0e06cdc178143dc.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/texture_cache/surface_base.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/surface_base.h b/src/video_core/texture_cache/surface_base.h
index a3dd1c607..210f27907 100644
--- a/src/video_core/texture_cache/surface_base.h
+++ b/src/video_core/texture_cache/surface_base.h
@@ -114,10 +114,23 @@ public:
bool MatchesTopology(const SurfaceParams& rhs) const {
const u32 src_bpp{params.GetBytesPerPixel()};
const u32 dst_bpp{rhs.GetBytesPerPixel()};
- return std::tie(src_bpp, params.is_tiled) == std::tie(dst_bpp, rhs.is_tiled);
+ const bool ib1 = params.IsBuffer();
+ const bool ib2 = rhs.IsBuffer();
+ return std::tie(src_bpp, params.is_tiled, ib1) == std::tie(dst_bpp, rhs.is_tiled, ib2);
}
MatchStructureResult MatchesStructure(const SurfaceParams& rhs) const {
+ // Buffer surface Check
+ if (params.IsBuffer()) {
+ const std::size_t wd1 = params.width*params.GetBytesPerPixel();
+ const std::size_t wd2 = rhs.width*rhs.GetBytesPerPixel();
+ if (wd1 == wd2) {
+ return MatchStructureResult::FullMatch;
+ }
+ return MatchStructureResult::None;
+ }
+
+ // Linear Surface check
if (!params.is_tiled) {
if (std::tie(params.width, params.height, params.pitch) ==
std::tie(rhs.width, rhs.height, rhs.pitch)) {
@@ -125,7 +138,8 @@ public:
}
return MatchStructureResult::None;
}
- // Tiled surface
+
+ // Tiled Surface check
if (std::tie(params.depth, params.block_width, params.block_height, params.block_depth,
params.tile_width_spacing, params.num_levels) ==
std::tie(rhs.depth, rhs.block_width, rhs.block_height, rhs.block_depth,