From be4b71b8052d06a4d1d300d279a7bd734f555ff2 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Thu, 23 Jul 2020 23:30:56 +0300 Subject: [PATCH] vk: Fixup for PR #8590 - This change was lost during rebase --- rpcs3/Emu/RSX/VK/VKGSRender.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index ee3dd89d7d..f527443f6f 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -2114,6 +2114,16 @@ void VKGSRender::prepare_rtts(rsx::framebuffer_creation_context context) flush_command_queue(); } + if (!m_rtts.superseded_surfaces.empty()) + { + for (auto& surface : m_rtts.superseded_surfaces) + { + m_texture_cache.discard_framebuffer_memory_region(*m_current_command_buffer, surface->get_memory_range()); + } + + m_rtts.superseded_surfaces.clear(); + } + const auto color_fmt_info = get_compatible_gcm_format(m_framebuffer_layout.color_format); for (u8 index : m_draw_buffers) {