From 32e525f8edf67359ac36f38d95a357512229e414 Mon Sep 17 00:00:00 2001 From: Nicolas James Date: Thu, 2 Apr 2026 11:10:53 +1100 Subject: Fix potential for early semaphore submission with Reflex --- src/swapchain_monitor.hh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/swapchain_monitor.hh') diff --git a/src/swapchain_monitor.hh b/src/swapchain_monitor.hh index e8603b5..eaf4933 100644 --- a/src/swapchain_monitor.hh +++ b/src/swapchain_monitor.hh @@ -12,6 +12,7 @@ #include #include +#include "instance_context.hh" #include "queue_context.hh" namespace low_latency { @@ -69,7 +70,14 @@ class ReflexSwapchainMonitor final : public SwapchainMonitor { public: void signal(const DeviceContext& device) const; }; - std::deque wakeup_semaphores; + + // A pairing of semaphore -> submissions. + // If the Submissions completes then signal the bundled semaphore. + struct SemaphoreSubmissions { + WakeupSemaphore wakeup_semaphore; + std::unique_ptr submissions; + }; + std::deque semaphore_submissions; std::mutex mutex; std::condition_variable_any cv; -- cgit v1.2.3