From 1d19f71a46684d8e74c7b07ab9488dbad393ae53 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Mon, 12 Nov 2018 16:15:28 +0300 Subject: [PATCH] rsx: Re-enable fifo error reset --- rpcs3/Emu/RSX/RSXFIFO.cpp | 2 +- rpcs3/Emu/RSX/RSXThread.cpp | 7 +++++++ rpcs3/Emu/RSX/RSXThread.h | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/RSXFIFO.cpp b/rpcs3/Emu/RSX/RSXFIFO.cpp index 9b913ce52b..321d8cfd5e 100644 --- a/rpcs3/Emu/RSX/RSXFIFO.cpp +++ b/rpcs3/Emu/RSX/RSXFIFO.cpp @@ -371,8 +371,8 @@ namespace rsx case FIFO::FIFO_ERROR: { // Error. Should reset the queue - // TODO LOG_ERROR(RSX, "FIFO error: possible desync event"); + fifo_ctrl->set_get(restore_point); std::this_thread::sleep_for(1ms); return; } diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index 99ccd2dbd8..af60eb96ee 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -653,6 +653,13 @@ namespace rsx continue; } + // Note a possible rollback address + if (sync_point_request) + { + restore_point = ctrl->get; + sync_point_request = false; + } + // Execute backend-local tasks first do_local_task(performance_counters.state); diff --git a/rpcs3/Emu/RSX/RSXThread.h b/rpcs3/Emu/RSX/RSXThread.h index 927a78ff04..a34833fcd7 100644 --- a/rpcs3/Emu/RSX/RSXThread.h +++ b/rpcs3/Emu/RSX/RSXThread.h @@ -403,7 +403,7 @@ namespace rsx public: RsxDmaControl* ctrl = nullptr; - atomic_t restore_point{ 0 }; + u32 restore_point = 0; atomic_t external_interrupt_lock{ false }; atomic_t external_interrupt_ack{ false };