summaryrefslogtreecommitdiffstats
path: root/core/templates/command_queue_mt.cpp
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2024-04-16 17:45:56 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2024-04-23 19:57:12 +0200
commit15de869a9c40f9977587535ff416cb79955fe400 (patch)
tree813d5cfcd9694b5657ac66792fad056cebe26f7b /core/templates/command_queue_mt.cpp
parent7abe0c6014022874378cb64a11b26b0f0f178324 (diff)
downloadredot-engine-15de869a9c40f9977587535ff416cb79955fe400.tar.gz
CommandQueueMT: Optimize & fix handling of sync/ret commands
Diffstat (limited to 'core/templates/command_queue_mt.cpp')
-rw-r--r--core/templates/command_queue_mt.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/core/templates/command_queue_mt.cpp b/core/templates/command_queue_mt.cpp
index 0c5c6394a1..d9e5e0b217 100644
--- a/core/templates/command_queue_mt.cpp
+++ b/core/templates/command_queue_mt.cpp
@@ -41,35 +41,6 @@ void CommandQueueMT::unlock() {
mutex.unlock();
}
-void CommandQueueMT::wait_for_flush() {
- // wait one millisecond for a flush to happen
- OS::get_singleton()->delay_usec(1000);
-}
-
-CommandQueueMT::SyncSemaphore *CommandQueueMT::_alloc_sync_sem() {
- int idx = -1;
-
- while (true) {
- lock();
- for (int i = 0; i < SYNC_SEMAPHORES; i++) {
- if (!sync_sems[i].in_use) {
- sync_sems[i].in_use = true;
- idx = i;
- break;
- }
- }
- unlock();
-
- if (idx == -1) {
- wait_for_flush();
- } else {
- break;
- }
- }
-
- return &sync_sems[idx];
-}
-
CommandQueueMT::CommandQueueMT() {
}