Skip to content

Commit

Permalink
rsx: Fix loading mid-draw call savestates
Browse files Browse the repository at this point in the history
  • Loading branch information
kd-11 authored and elad335 committed Mar 29, 2024
1 parent 41f05f6 commit ec37e8f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions rpcs3/Emu/RSX/RSXThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -943,14 +938,22 @@ namespace rsx
{
g_fxo->get<rsx::dma_manager>().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;
is_initialized.notify_all();

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>();
}

Expand Down

0 comments on commit ec37e8f

Please sign in to comment.