You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Move wait_for_flush out of queue lock
This commit is contained in:
@@ -55,6 +55,7 @@ CommandQueueMT::SyncSemaphore *CommandQueueMT::_alloc_sync_sem() {
|
||||
|
||||
while (true) {
|
||||
|
||||
lock();
|
||||
for (int i = 0; i < SYNC_SEMAPHORES; i++) {
|
||||
|
||||
if (!sync_sems[i].in_use) {
|
||||
@@ -63,6 +64,7 @@ CommandQueueMT::SyncSemaphore *CommandQueueMT::_alloc_sync_sem() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
unlock();
|
||||
|
||||
if (idx == -1) {
|
||||
wait_for_flush();
|
||||
|
||||
Reference in New Issue
Block a user