mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
d3d12: Emit an error if waiting for too long for semaphore
This commit is contained in:
parent
d2c13bc4c1
commit
c53828787a
1 changed files with 5 additions and 0 deletions
|
@ -1215,10 +1215,15 @@ void D3D12GSRender::semaphorePGRAPHBackendRelease(u32 offset, u32 value)
|
|||
|
||||
void D3D12GSRender::semaphorePFIFOAcquire(u32 offset, u32 value)
|
||||
{
|
||||
const std::chrono::time_point<std::chrono::system_clock> enterWait = std::chrono::system_clock::now();
|
||||
while (true)
|
||||
{
|
||||
u32 val = vm::read32(m_label_addr + offset);
|
||||
if (val == value) break;
|
||||
std::chrono::time_point<std::chrono::system_clock> waitPoint = std::chrono::system_clock::now();
|
||||
int elapsedTime = std::chrono::duration_cast<std::chrono::seconds>(waitPoint - enterWait).count();
|
||||
if (elapsedTime > 0)
|
||||
LOG_ERROR(RSX, "Has wait for more than a second for semaphore acquire");
|
||||
std::this_thread::yield();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue