mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-21 09:40:01 +00:00
rsx: Improve FIFO mem faults handling
increase the delay between faults, reduce log spam by allowing the messages to stack up
This commit is contained in:
parent
a8ea576b22
commit
e6b68b260a
@ -484,9 +484,6 @@ namespace rsx
|
|||||||
std::vector<u32> deferred_stack;
|
std::vector<u32> deferred_stack;
|
||||||
bool has_deferred_call = false;
|
bool has_deferred_call = false;
|
||||||
|
|
||||||
// Track register address faults
|
|
||||||
u32 mem_faults_count = 0;
|
|
||||||
|
|
||||||
auto flush_command_queue = [&]()
|
auto flush_command_queue = [&]()
|
||||||
{
|
{
|
||||||
const auto num_draws = (u32)method_registers.current_draw_clause.first_count_commands.size();
|
const auto num_draws = (u32)method_registers.current_draw_clause.first_count_commands.size();
|
||||||
@ -631,19 +628,14 @@ namespace rsx
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG_ERROR(RSX, "Invalid FIFO queue get/put registers found, get=0x%X, put=0x%X", internal_get.load(), put);
|
std::this_thread::sleep_for(33ms);
|
||||||
|
|
||||||
if (mem_faults_count >= 3)
|
if (!RSXIOMem.RealAddr(internal_get))
|
||||||
{
|
{
|
||||||
LOG_ERROR(RSX, "Application has failed to recover, resetting FIFO queue");
|
LOG_ERROR(RSX, "Invalid FIFO queue get/put registers found: get=0x%X, put=0x%X; Resetting...", +internal_get, put);
|
||||||
internal_get = restore_point.load();
|
internal_get = restore_point.load();
|
||||||
m_return_addr = restore_ret_addr;
|
m_return_addr = restore_ret_addr;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
mem_faults_count++;
|
|
||||||
std::this_thread::sleep_for(10ms);
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -735,31 +727,22 @@ namespace rsx
|
|||||||
u32 count = (cmd >> 18) & 0x7ff;
|
u32 count = (cmd >> 18) & 0x7ff;
|
||||||
|
|
||||||
//Validate the args ptr if the command attempts to read from it
|
//Validate the args ptr if the command attempts to read from it
|
||||||
const u32 args_address = RSXIOMem.RealAddr(internal_get + 4);
|
auto args = vm::ptr<u32>::make(RSXIOMem.RealAddr(internal_get + 4));
|
||||||
|
|
||||||
if (!args_address && count)
|
if (!args && count)
|
||||||
{
|
{
|
||||||
LOG_ERROR(RSX, "Invalid FIFO queue args ptr found, get=0x%X, cmd=0x%X, count=%d", internal_get.load(), cmd, count);
|
std::this_thread::sleep_for(33ms);
|
||||||
|
|
||||||
if (mem_faults_count >= 3)
|
if (!RSXIOMem.RealAddr(internal_get + 4))
|
||||||
{
|
{
|
||||||
LOG_ERROR(RSX, "Application has failed to recover, resetting FIFO queue");
|
LOG_ERROR(RSX, "Invalid FIFO queue args ptr found: get=0x%X, put=0x%X, count=%d; Resetting...", +internal_get, put, count);
|
||||||
internal_get = restore_point.load();
|
internal_get = restore_point.load();
|
||||||
m_return_addr = restore_ret_addr;
|
m_return_addr = restore_ret_addr;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
mem_faults_count++;
|
|
||||||
std::this_thread::sleep_for(10ms);
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// All good on valid memory ptrs
|
|
||||||
mem_faults_count = 0;
|
|
||||||
|
|
||||||
auto args = vm::ptr<u32>::make(args_address);
|
|
||||||
u32 first_cmd = (cmd & 0xfffc) >> 2;
|
u32 first_cmd = (cmd & 0xfffc) >> 2;
|
||||||
|
|
||||||
// Stop command execution if put will be equal to get ptr during the execution itself
|
// Stop command execution if put will be equal to get ptr during the execution itself
|
||||||
|
Loading…
x
Reference in New Issue
Block a user