summary refs log tree commit diff
path: root/src/Compute/Queue.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2023-07-29 03:31:42 +0200
committerMel <einebeere@gmail.com>2023-07-29 03:31:42 +0200
commit6b69d4b5b648253f894707723af0e2eae9f71445 (patch)
tree0cd0b6c7b18c30abbb2618f553f144d1d06dacba /src/Compute/Queue.hpp
parent2eef7cf49b7a15559ee7bb6719411bcf67386213 (diff)
downloadmeowcraft-6b69d4b5b648253f894707723af0e2eae9f71445.tar.zst
meowcraft-6b69d4b5b648253f894707723af0e2eae9f71445.zip
Move chunk reification to worker threads and set stage for chunk-unbound lighting
Diffstat (limited to 'src/Compute/Queue.hpp')
-rw-r--r--src/Compute/Queue.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Compute/Queue.hpp b/src/Compute/Queue.hpp
index 06469f8..e201932 100644
--- a/src/Compute/Queue.hpp
+++ b/src/Compute/Queue.hpp
@@ -25,6 +25,11 @@ public:
         m_control->work.jobs.emplace(id, priority, execute);
     }
 
+    USize size() const {
+        std::scoped_lock work_lock(m_control->work.mutex);
+        return m_control->work.jobs.size();
+    }
+
     struct Result {
         I id{};
         X res;