From bb7c9b56e1710a7f2a3f4bb57f181e4fa196aba2 Mon Sep 17 00:00:00 2001 From: Nicolas James Date: Wed, 18 Feb 2026 14:51:21 +1100 Subject: Fix missing cpu time between gpu presents, simplify timestamp->get_time() --- src/timestamp_pool.hh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/timestamp_pool.hh') diff --git a/src/timestamp_pool.hh b/src/timestamp_pool.hh index 681c9e2..b7aa54e 100644 --- a/src/timestamp_pool.hh +++ b/src/timestamp_pool.hh @@ -18,6 +18,8 @@ #include #include +#include "device_context.hh" + namespace low_latency { class QueueContext; @@ -58,6 +60,7 @@ class TimestampPool final { friend class TimestampPool; private: + const TimestampPool& timestamp_pool; const std::weak_ptr origin_chunk; public: @@ -66,7 +69,8 @@ class TimestampPool final { const VkCommandBuffer command_buffer; public: - Handle(const std::shared_ptr& origin_chunk, + Handle(const TimestampPool& timestamp_pool, + const std::shared_ptr& origin_chunk, const std::uint64_t& query_index); Handle(const Handle& handle) = delete; Handle(Handle&&) = delete; @@ -78,7 +82,7 @@ class TimestampPool final { void setup_command_buffers(const Handle& tail, const QueueContext& queue_context) const; - std::optional get_ticks(const TimestampPool& pool); + DeviceContext::Clock::time_point_t get_time(); }; public: -- cgit v1.2.3