Skip to content

Commit

Permalink
OpenGL: Fix hang that mostly happened when buffered commands == off
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Sep 10, 2023
1 parent d4365c6 commit 626d901
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Common/GPU/OpenGL/GLRenderManager.cpp
Expand Up @@ -422,6 +422,7 @@ void GLRenderManager::Present() {
{
std::unique_lock<std::mutex> lock(pushMutex_);
renderThreadQueue_.push(presentTask);
pushCondVar_.notify_one();
}

int newCurFrame = curFrame_ + 1;
Expand Down Expand Up @@ -524,7 +525,7 @@ bool GLRenderManager::Run(GLRRenderThreadTask &task) {
// glFinish is not actually necessary here, and won't be unless we start using
// glBufferStorage. Then we need to use fences.
{
std::unique_lock<std::mutex> lock(syncMutex_);
std::lock_guard<std::mutex> lock(syncMutex_);
syncDone_ = true;
syncCondVar_.notify_one();
}
Expand Down

0 comments on commit 626d901

Please sign in to comment.