From ec37e8f0dc75f1ef6032382c25ea4fc5c1e677df Mon Sep 17 00:00:00 2001 From: kd-11 Date: Fri, 29 Mar 2024 02:34:53 +0300 Subject: [PATCH] rsx: Fix loading mid-draw call savestates --- rpcs3/Emu/RSX/RSXThread.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index 4b8542e52c..498433d776 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -615,11 +615,6 @@ namespace rsx ar(display_buffers, display_buffers_count, current_display_buffer); ar(unsent_gcm_events, rsx::method_registers.current_draw_clause); - if (in_begin_end) - { - rsx_log.error("Savestate created in draw call scope. Report to developers if there are issues with it."); - } - if (ar.is_writing() || version >= 2) { ar(vblank_count); @@ -943,6 +938,14 @@ namespace rsx { g_fxo->get().init(); on_init_thread(); + + if (in_begin_end) + { + // on_init_thread should have prepared the backend resources + // Run draw call warmup again if the savestate happened mid-draw + ensure(serialized); + begin(); + } } is_initialized = true; @@ -950,7 +953,7 @@ namespace rsx if (!zcull_ctrl) { - //Backend did not provide an implementation, provide NULL object + // Backend did not provide an implementation, provide NULL object zcull_ctrl = std::make_unique<::rsx::reports::ZCULL_control>(); }