aboutsummaryrefslogtreecommitdiff
path: root/src/timestamp_pool.hh
diff options
context:
space:
mode:
authorNicolas James <nj3ahxac@gmail.com>2026-02-18 14:51:21 +1100
committerNicolas James <nj3ahxac@gmail.com>2026-02-18 14:51:21 +1100
commitbb7c9b56e1710a7f2a3f4bb57f181e4fa196aba2 (patch)
treee9de8b88afcb339af9a7c87156511f6cc238f829 /src/timestamp_pool.hh
parentb7414a760c183d4987090c110ddacca277983e17 (diff)
Fix missing cpu time between gpu presents, simplify timestamp->get_time()
Diffstat (limited to 'src/timestamp_pool.hh')
-rw-r--r--src/timestamp_pool.hh8
1 files changed, 6 insertions, 2 deletions
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 <unordered_set>
#include <vector>
+#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<QueryChunk> origin_chunk;
public:
@@ -66,7 +69,8 @@ class TimestampPool final {
const VkCommandBuffer command_buffer;
public:
- Handle(const std::shared_ptr<QueryChunk>& origin_chunk,
+ Handle(const TimestampPool& timestamp_pool,
+ const std::shared_ptr<QueryChunk>& 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<std::uint64_t> get_ticks(const TimestampPool& pool);
+ DeviceContext::Clock::time_point_t get_time();
};
public: