Skip to content

Commit 64928ef

Browse files
committed
Added locks to vkDeviceWaitIdle calls to prevent anything happening on other threads simultaneously
1 parent 9650914 commit 64928ef

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/ngscopeclient/MainWindow.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ MainWindow::~MainWindow()
185185
{
186186
LogTrace("Application exiting\n");
187187

188+
lock_guard<shared_mutex> lock(g_vulkanActivityMutex);
188189
g_vkComputeDevice->waitIdle();
189190
m_texmgr.clear();
190191

@@ -616,6 +617,7 @@ void MainWindow::RenderUI()
616617
//Block until all background processing completes to ensure no command buffers are still pending
617618
if(!m_groupsToClose.empty())
618619
{
620+
lock_guard<shared_mutex> lock(g_vulkanActivityMutex);
619621
g_vkComputeDevice->waitIdle();
620622
m_groupsToClose.clear();
621623
}

0 commit comments

Comments
 (0)