Skip to content

Commit baa8b46

Browse files
committed
low latency mat lock
1 parent bacde43 commit baa8b46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

materialsystem/cmaterialsystem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4964,9 +4964,9 @@ MaterialLock_t CMaterialSystem::Lock()
49644964
#if 1 // Rick's optimization: not sure this is needed anymore
49654965
if ( pCurContext != &m_HardwareRenderContext && m_pActiveAsyncJob )
49664966
{
4967-
if (!m_pActiveAsyncJob->IsFinished())
4967+
while (!m_pActiveAsyncJob->IsFinished())
49684968
{
4969-
m_pActiveAsyncJob->WaitForFinish();
4969+
m_pActiveAsyncJob->WaitForFinish(0);
49704970
}
49714971
// threadsafety note: not releasing or nulling pointer.
49724972
}

0 commit comments

Comments
 (0)