Fixed race condition that could result in the texture and mesh streamer miscalculating the amount of GPU memory available for new asset uploads

This commit is contained in:
2014-08-27 22:06:09 -07:00
parent 9f84482ec3
commit 8c965c8f0d
2 changed files with 4 additions and 0 deletions

View File

@@ -276,6 +276,8 @@ void KRMeshManager::doStreaming(long &memoryRemaining, long &memoryRemainingThis
m_streamerFenceMutex.lock();
m_streamerComplete = true;
m_streamerFenceMutex.unlock();
} else {
memoryRemaining -= getMemUsed();
}
}

View File

@@ -320,6 +320,8 @@ void KRTextureManager::doStreaming(long &memoryRemaining, long &memoryRemainingT
m_streamerFenceMutex.lock();
m_streamerComplete = true;
m_streamerFenceMutex.unlock();
} else {
memoryRemaining -= getMemUsed();
}
}