diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-05-18 10:57:49 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-06-21 02:38:33 +0200 |
commit | 175aa343ff1c9f931b266caf2d19b8df943dab0d (patch) | |
tree | c9cdf1f449232c7fc0728be6bbc86d8537ff44aa /src/video_core/texture_cache/surface_base.h | |
parent | gl_shader_decompiler: Implement image binding settings (diff) | |
download | yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.gz yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.bz2 yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.lz yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.xz yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.zst yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.zip |
Diffstat (limited to 'src/video_core/texture_cache/surface_base.h')
-rw-r--r-- | src/video_core/texture_cache/surface_base.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/video_core/texture_cache/surface_base.h b/src/video_core/texture_cache/surface_base.h index cb7f22706..a3dd1c607 100644 --- a/src/video_core/texture_cache/surface_base.h +++ b/src/video_core/texture_cache/surface_base.h @@ -126,14 +126,19 @@ public: return MatchStructureResult::None; } // Tiled surface - if (std::tie(params.height, params.depth, params.block_width, params.block_height, - params.block_depth, params.tile_width_spacing, params.num_levels) == - std::tie(rhs.height, rhs.depth, rhs.block_width, rhs.block_height, rhs.block_depth, + 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, rhs.tile_width_spacing, rhs.num_levels)) { - if (params.width == rhs.width) { + if (std::tie(params.width, params.height) == std::tie(rhs.width, rhs.height)) { return MatchStructureResult::FullMatch; } - if (params.GetBlockAlignedWidth() == rhs.GetBlockAlignedWidth()) { + const u32 ws = SurfaceParams::ConvertWidth(rhs.GetBlockAlignedWidth(), + params.pixel_format, rhs.pixel_format); + const u32 hs = + SurfaceParams::ConvertHeight(rhs.height, params.pixel_format, rhs.pixel_format); + const u32 w1 = params.GetBlockAlignedWidth(); + if (std::tie(w1, params.height) == std::tie(ws, hs)) { return MatchStructureResult::SemiMatch; } } |