From a936e43ff6da02761a14b65cec18bd2630ea4483 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sun, 13 Oct 2019 17:41:05 +0300 Subject: [PATCH] rsx: Fixup for slice gathering for structures with multiple mipmap levels - TODO: Proper multi-level assembly for non-2D structures --- rpcs3/Emu/RSX/Common/texture_cache_helpers.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/rpcs3/Emu/RSX/Common/texture_cache_helpers.h b/rpcs3/Emu/RSX/Common/texture_cache_helpers.h index d51fd7166d..a273eed65e 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache_helpers.h +++ b/rpcs3/Emu/RSX/Common/texture_cache_helpers.h @@ -172,7 +172,6 @@ namespace rsx }; std::vector sort_list; - const auto src_slice_h = attr.height; if (!fbos.empty() && !local.empty()) { @@ -206,8 +205,8 @@ namespace rsx return; } - const u32 slice_begin = (slice * src_slice_h); - const u32 slice_end = (slice_begin + attr.slice_h); + const u32 slice_begin = (slice * attr.slice_h); + const u32 slice_end = (slice_begin + attr.height); const u32 section_end = section.dst_area.y + section.dst_area.height; if (section.dst_area.y >= slice_end || section_end <= slice_begin) @@ -279,8 +278,8 @@ namespace rsx return; } - const auto slice_begin = u32(slice * src_slice_h); - const auto slice_end = u32(slice_begin + attr.slice_h); + const auto slice_begin = u32(slice * attr.slice_h); + const auto slice_end = u32(slice_begin + attr.height); const auto dst_y = std::get<1>(clipped).y; const auto dst_h = std::get<2>(clipped).height; @@ -338,7 +337,7 @@ namespace rsx u32 current_address = attr.address; u16 current_src_offset = 0; u16 current_dst_offset = 0; - u32 slice_size = (attr.pitch * src_slice_h); + u32 slice_size = (attr.pitch * attr.slice_h); out.reserve(count); u16 found_slices = 0;