From 2bcc755fcafc891fcc95eec191970185791f84bb Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sat, 28 May 2016 13:20:39 +0300 Subject: [PATCH] Ignore clear if surface target is set to CELL_GCM_SURFACE_TARGET_NONE --- rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp | 2 ++ rpcs3/Emu/RSX/GL/GLGSRender.cpp | 1 + rpcs3/Emu/RSX/VK/VKGSRender.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp b/rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp index 0644e2dff6..e77875d69a 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12RenderTargetSets.cpp @@ -123,6 +123,8 @@ namespace void D3D12GSRender::clear_surface(u32 arg) { + if (!rsx::method_registers[NV4097_SET_SURFACE_FORMAT]) return; + std::chrono::time_point start_duration = std::chrono::system_clock::now(); std::chrono::time_point rtt_duration_start = std::chrono::system_clock::now(); diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index eea02008a4..72dea64d18 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -453,6 +453,7 @@ void GLGSRender::on_exit() void nv4097_clear_surface(u32 arg, GLGSRender* renderer) { //LOG_NOTICE(Log::RSX, "nv4097_clear_surface(0x%x)", arg); + if (!rsx::method_registers[NV4097_SET_SURFACE_FORMAT]) return; if ((arg & 0xf3) == 0) { diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index 73919ceb96..cba8074b01 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -666,8 +666,8 @@ void VKGSRender::clear_surface(u32 mask) { //TODO: Build clear commands into current renderpass descriptor set if (!(mask & 0xF3)) return; - if (m_current_present_image== 0xFFFF) return; + if (!rsx::method_registers[NV4097_SET_SURFACE_FORMAT]) return; init_buffers();