mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 15:31:26 +12:00
rsx: Minor fixes
- Abort nv406e semaphore acquire if the rsx thread stalls/crashes - Fix texture size approximation to take mipmaps into account. Fixes some games hanging with WCB
This commit is contained in:
parent
3338fdb936
commit
ff0f1510e5
2 changed files with 12 additions and 2 deletions
|
@ -63,6 +63,9 @@ namespace rsx
|
|||
void semaphore_acquire(thread* rsx, u32 _reg, u32 arg)
|
||||
{
|
||||
const u32 addr = get_address(method_registers.semaphore_offset_406e(), method_registers.semaphore_context_dma_406e());
|
||||
if (vm::ps3::read32(addr) == arg) return;
|
||||
|
||||
const u64 start = get_system_time();
|
||||
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?!
|
||||
|
@ -72,6 +75,13 @@ namespace rsx
|
|||
if (Emu.IsStopped())
|
||||
break;
|
||||
|
||||
if ((get_system_time() - start) > 33000)
|
||||
{
|
||||
//If longer than 33ms force exit (1 frame)
|
||||
LOG_ERROR(RSX, "nv406e::semaphore_acquire has timed out. semaphore_address=0x%X", addr);
|
||||
break;
|
||||
}
|
||||
|
||||
std::this_thread::yield();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue