mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 08:21:29 +12:00
rsx: Modify semaphore_acquire timeout detection
- Take paused state into account - Make timeout configurable
This commit is contained in:
parent
d6bc6ec2c1
commit
4819847c46
2 changed files with 28 additions and 6 deletions
|
@ -65,7 +65,7 @@ namespace rsx
|
||||||
const u32 addr = get_address(method_registers.semaphore_offset_406e(), method_registers.semaphore_context_dma_406e());
|
const u32 addr = get_address(method_registers.semaphore_offset_406e(), method_registers.semaphore_context_dma_406e());
|
||||||
if (vm::ps3::read32(addr) == arg) return;
|
if (vm::ps3::read32(addr) == arg) return;
|
||||||
|
|
||||||
const u64 start = get_system_time();
|
u64 start = get_system_time();
|
||||||
while (vm::ps3::read32(addr) != arg)
|
while (vm::ps3::read32(addr) != arg)
|
||||||
{
|
{
|
||||||
// todo: LLE: why does this one keep hanging? is it vsh system semaphore? whats actually pushing this to the command buffer?!
|
// todo: LLE: why does this one keep hanging? is it vsh system semaphore? whats actually pushing this to the command buffer?!
|
||||||
|
@ -75,14 +75,35 @@ namespace rsx
|
||||||
if (Emu.IsStopped())
|
if (Emu.IsStopped())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ((get_system_time() - start) > 1000000)
|
const auto tdr = (s64)g_cfg.video.driver_recovery_timeout;
|
||||||
|
if (tdr == 0)
|
||||||
{
|
{
|
||||||
//If longer than 1s force exit
|
//No timeout
|
||||||
LOG_ERROR(RSX, "nv406e::semaphore_acquire has timed out. semaphore_address=0x%X", addr);
|
std::this_thread::yield();
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::this_thread::yield();
|
if (Emu.IsPaused())
|
||||||
|
{
|
||||||
|
while (Emu.IsPaused())
|
||||||
|
{
|
||||||
|
std::this_thread::yield();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Reset
|
||||||
|
start = get_system_time();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((get_system_time() - start) > tdr)
|
||||||
|
{
|
||||||
|
//If longer than driver timeout force exit
|
||||||
|
LOG_ERROR(RSX, "nv406e::semaphore_acquire has timed out. semaphore_address=0x%X", addr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::this_thread::yield();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -342,6 +342,7 @@ struct cfg_root : cfg::node
|
||||||
cfg::_int<50, 800> resolution_scale_percent{this, "Resolution Scale", 100};
|
cfg::_int<50, 800> resolution_scale_percent{this, "Resolution Scale", 100};
|
||||||
cfg::_int<0, 16> anisotropic_level_override{this, "Anisotropic Filter Override", 0};
|
cfg::_int<0, 16> anisotropic_level_override{this, "Anisotropic Filter Override", 0};
|
||||||
cfg::_int<1, 1024> min_scalable_dimension{this, "Minimum Scalable Dimension", 16};
|
cfg::_int<1, 1024> min_scalable_dimension{this, "Minimum Scalable Dimension", 16};
|
||||||
|
cfg::_int<0, 30000000> driver_recovery_timeout{this, "Driver Recovery Timeout", 1000000};
|
||||||
|
|
||||||
struct node_d3d12 : cfg::node
|
struct node_d3d12 : cfg::node
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue