When GPU syncing, check that it's successful & wait long enough for TDR

* This means if we're trying to track a TDR by SINGLE_FLUSH_VALIDATE we
  will definitely catch it failing here.
This commit is contained in:
baldurk
2016-10-26 23:14:11 +02:00
parent 451203187d
commit 95c2863ab2
+6 -2
View File
@@ -1815,9 +1815,13 @@ void WrappedID3D12Device::GPUSync()
{
m_GPUSyncCounter++;
m_Queue->Signal(m_GPUSyncFence, m_GPUSyncCounter);
HRESULT hr = m_Queue->Signal(m_GPUSyncFence, m_GPUSyncCounter);
m_GPUSyncFence->SetEventOnCompletion(m_GPUSyncCounter, m_GPUSyncHandle);
WaitForSingleObject(m_GPUSyncHandle, 2000);
WaitForSingleObject(m_GPUSyncHandle, 10000);
RDCASSERTEQUAL(hr, S_OK);
hr = m_pDevice->GetDeviceRemovedReason();
RDCASSERTEQUAL(hr, S_OK);
}
ID3D12GraphicsCommandList *WrappedID3D12Device::GetNewList()