diff options
| author | Nicolas James <nj3ahxac@gmail.com> | 2026-04-12 18:45:49 +1000 |
|---|---|---|
| committer | Nicolas James <nj3ahxac@gmail.com> | 2026-04-12 18:45:49 +1000 |
| commit | 59289c6fcd79e52a4395451f61851661c417dbb3 (patch) | |
| tree | d3cb760880805c84ed29b2d5e9fcfa69015e1625 /src/strategies/low_latency2/swapchain_monitor.hh | |
| parent | 973532a7d28c2afbaaf0fe79efa9a5084d14e3aa (diff) | |
LowLatency2: Check semaphore value before signalling
Diffstat (limited to 'src/strategies/low_latency2/swapchain_monitor.hh')
| -rw-r--r-- | src/strategies/low_latency2/swapchain_monitor.hh | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/strategies/low_latency2/swapchain_monitor.hh b/src/strategies/low_latency2/swapchain_monitor.hh index ddc25ef..5906ad1 100644 --- a/src/strategies/low_latency2/swapchain_monitor.hh +++ b/src/strategies/low_latency2/swapchain_monitor.hh @@ -4,6 +4,7 @@ #include "atomic_time_point.hh" #include "frame_span.hh" +#include "semaphore_signal.hh" #include <vulkan/vulkan.h> @@ -19,18 +20,10 @@ class DeviceContext; class SwapchainMonitor final { private: - struct WakeupSemaphore { - VkSemaphore timeline_semaphore{}; - std::uint64_t value{}; - - public: - void signal(const DeviceContext& device) const; - }; - std::vector<std::unique_ptr<FrameSpan>> pending_frame_spans{}; struct PendingSignal { - WakeupSemaphore wakeup_semaphore{}; + SemaphoreSignal semaphore_signal; std::vector<std::unique_ptr<FrameSpan>> frame_spans{}; }; std::deque<PendingSignal> pending_signals{}; @@ -60,8 +53,7 @@ class SwapchainMonitor final { void update_params(const bool was_low_latency_requested, const std::chrono::microseconds delay); - void notify_semaphore(const VkSemaphore& timeline_semaphore, - const std::uint64_t& value); + void notify_semaphore(const SemaphoreSignal& semaphore_signal); void attach_work(std::vector<std::unique_ptr<FrameSpan>> submissions); }; |
