mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 12:12:50 +01:00
rsx: Stop executing broken command queues if the application fails to recover in 3 retries
This commit is contained in:
parent
9af71699a4
commit
c570410e06
@ -403,6 +403,9 @@ 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();
|
||||||
@ -494,6 +497,17 @@ namespace rsx
|
|||||||
{
|
{
|
||||||
LOG_ERROR(RSX, "Invalid FIFO queue get/put registers found, get=0x%X, put=0x%X", get, put);
|
LOG_ERROR(RSX, "Invalid FIFO queue get/put registers found, get=0x%X, put=0x%X", get, put);
|
||||||
|
|
||||||
|
if (mem_faults_count >= 3)
|
||||||
|
{
|
||||||
|
LOG_ERROR(RSX, "Application has failed to recover, discarding FIFO queue");
|
||||||
|
ctrl->get = put;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mem_faults_count++;
|
||||||
|
std::this_thread::sleep_for(1ms);
|
||||||
|
}
|
||||||
|
|
||||||
invalid_command_interrupt_raised = true;
|
invalid_command_interrupt_raised = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -544,10 +558,24 @@ namespace rsx
|
|||||||
{
|
{
|
||||||
LOG_ERROR(RSX, "Invalid FIFO queue args ptr found, get=0x%X, cmd=0x%X, count=%d", get, cmd, count);
|
LOG_ERROR(RSX, "Invalid FIFO queue args ptr found, get=0x%X, cmd=0x%X, count=%d", get, cmd, count);
|
||||||
|
|
||||||
|
if (mem_faults_count >= 3)
|
||||||
|
{
|
||||||
|
LOG_ERROR(RSX, "Application has failed to recover, discarding FIFO queue");
|
||||||
|
ctrl->get = put;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mem_faults_count++;
|
||||||
|
std::this_thread::sleep_for(1ms);
|
||||||
|
}
|
||||||
|
|
||||||
invalid_command_interrupt_raised = true;
|
invalid_command_interrupt_raised = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// All good on valid memory ptrs
|
||||||
|
mem_faults_count = 0;
|
||||||
|
|
||||||
auto args = vm::ptr<u32>::make(args_address);
|
auto args = vm::ptr<u32>::make(args_address);
|
||||||
invalid_command_interrupt_raised = false;
|
invalid_command_interrupt_raised = false;
|
||||||
bool unaligned_command = false;
|
bool unaligned_command = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user