From 7f99de36c1340e11b15c1d0fdf6e8a1fabc1ed6b Mon Sep 17 00:00:00 2001 From: kd-11 Date: Fri, 30 Aug 2019 15:21:42 +0300 Subject: [PATCH] rsx: Fixup for surface_target_a flag being broken - While the mask for surface_a is at index 0, the surface cache expects the order to be maintained correctly! Set the correct mask since surface store now checks each RTT individually --- rpcs3/Emu/RSX/Common/surface_store.h | 1 + rpcs3/Emu/RSX/RSXThread.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/Common/surface_store.h b/rpcs3/Emu/RSX/Common/surface_store.h index 47d80c4b3e..c804e75b7b 100644 --- a/rpcs3/Emu/RSX/Common/surface_store.h +++ b/rpcs3/Emu/RSX/Common/surface_store.h @@ -887,6 +887,7 @@ namespace rsx if (write_tag == cache_tag && m_skip_write_updates) { // Nothing to do + verify(HERE), !m_invalidate_on_write; return; } diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index d2e758b807..69fb98a259 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -1092,7 +1092,8 @@ namespace rsx { if (rsx::method_registers.color_write_enabled(i)) { - layout.color_write_enabled[i] = true; + const auto real_index = mrt_buffers[i]; + layout.color_write_enabled[real_index] = true; color_write_enabled = true; } }