aboutsummaryrefslogtreecommitdiff
path: root/src/timestamp_pool.hh
diff options
context:
space:
mode:
authorNicolas James <nj3ahxac@gmail.com>2026-04-08 12:55:29 +1000
committerNicolas James <nj3ahxac@gmail.com>2026-04-08 12:55:29 +1000
commit453d5b0052bd17ed74d47570ffff403ffcd9ebb3 (patch)
tree14ab71a5ff27d5485faea061f6e8fe26c0e19640 /src/timestamp_pool.hh
parenteb9719cc8b9a308654ccd2c3bce8a7047b6e2a1a (diff)
Fix refactor latency regression for VK_NV_LowLatency2 by checking if work has already completed
Diffstat (limited to 'src/timestamp_pool.hh')
-rw-r--r--src/timestamp_pool.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/timestamp_pool.hh b/src/timestamp_pool.hh
index 809c6a4..767455a 100644
--- a/src/timestamp_pool.hh
+++ b/src/timestamp_pool.hh
@@ -10,6 +10,7 @@
#include <deque>
#include <memory>
#include <mutex>
+#include <optional>
#include <thread>
#include <unordered_set>
#include <vector>
@@ -130,6 +131,15 @@ class TimestampPool final {
// Blocks until the time is available.
void await_start() const;
void await_end() const;
+
+ private:
+ std::optional<std::uint64_t>
+ has_time_impl(const std::uint32_t offset) const;
+
+ public:
+ // Checks if the time is available - doesn't block.
+ bool has_start() const;
+ bool has_end() const;
};
private: