diff options
| author | Nicolas James <nj3ahxac@gmail.com> | 2026-04-08 00:56:40 +1000 |
|---|---|---|
| committer | Nicolas James <nj3ahxac@gmail.com> | 2026-04-08 00:56:40 +1000 |
| commit | eb9719cc8b9a308654ccd2c3bce8a7047b6e2a1a (patch) | |
| tree | 5e72b419d3dc900a35921be5e551b17552251769 /src/timestamp_pool.cc | |
| parent | 69764a869d99e9abd0fbe10c2773d3556d7f35e8 (diff) | |
Refactor storing submissions into FrameSpan class, reduce AntiLag thread contention
Diffstat (limited to 'src/timestamp_pool.cc')
| -rw-r--r-- | src/timestamp_pool.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/timestamp_pool.cc b/src/timestamp_pool.cc index b52e8f8..afb12f7 100644 --- a/src/timestamp_pool.cc +++ b/src/timestamp_pool.cc @@ -164,7 +164,7 @@ void TimestampPool::do_reaper(const std::stop_token stoken) { // Allow more to go on the queue while we wait for it to finish. lock.unlock(); - handle_ptr->await_end_time(); + handle_ptr->await_end(); // Lock our mutex, allow the queue to use it again and delete it. lock.lock(); @@ -185,7 +185,7 @@ const VkCommandBuffer& TimestampPool::Handle::get_end_buffer() const { return command_buffers[this->query_index + 1]; } -DeviceClock::time_point_t +std::uint64_t TimestampPool::Handle::await_time_impl(const std::uint32_t offset) const { const auto& context = this->timestamp_pool.queue_context.device; @@ -201,15 +201,11 @@ TimestampPool::Handle::await_time_impl(const std::uint32_t offset) const { VK_QUERY_RESULT_WAIT_BIT)); assert(query_result[1]); - return context.clock->ticks_to_time(query_result[0]); + return query_result[0]; } -DeviceClock::time_point_t TimestampPool::Handle::await_start_time() const { - return this->await_time_impl(0); -} -DeviceClock::time_point_t TimestampPool::Handle::await_end_time() const { - return this->await_time_impl(1); -} +void TimestampPool::Handle::await_start() const { this->await_time_impl(0); } +void TimestampPool::Handle::await_end() const { this->await_time_impl(1); } TimestampPool::~TimestampPool() {} |
