1
0
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

(cherry picked from commit f6ee4cac39)
This commit is contained in:
Sipaha
2017-08-21 01:10:44 +07:00
committed by Rémi Verschelde
parent 802fab11e4
commit a6b160660c
2 changed files with 47 additions and 18 deletions

View File

@@ -54,6 +54,7 @@ CommandQueueMT::SyncSemaphore *CommandQueueMT::_alloc_sync_sem() {
while (true) {
lock();
for (int i = 0; i < SYNC_SEMAPHORES; i++) {
if (!sync_sems[i].in_use) {
@@ -62,6 +63,7 @@ CommandQueueMT::SyncSemaphore *CommandQueueMT::_alloc_sync_sem() {
break;
}
}
unlock();
if (idx == -1) {
wait_for_flush();