From e0f7daf292db65d8aa492b6bc29ad245a9f83a2d Mon Sep 17 00:00:00 2001 From: Nicolas James Date: Sun, 15 Feb 2026 12:52:19 +1100 Subject: Implement anti lag 1 / whatever nvidia reflex equivalent is --- src/device_context.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/device_context.cc') diff --git a/src/device_context.cc b/src/device_context.cc index f849df1..59d818e 100644 --- a/src/device_context.cc +++ b/src/device_context.cc @@ -2,6 +2,7 @@ #include "queue_context.hh" #include +#include namespace low_latency { @@ -24,6 +25,9 @@ DeviceContext::~DeviceContext() { void DeviceContext::notify_acquire(const VkSwapchainKHR& swapchain, const std::uint32_t& image_index, const VkSemaphore& signal_semaphore) { + + std::cerr << "notify acquire for swapchain: " << swapchain << " : " << image_index << '\n'; + std::cerr << " signal semaphore: " << signal_semaphore << '\n'; const auto it = this->swapchain_signals.try_emplace(swapchain).first; @@ -57,6 +61,7 @@ void DeviceContext::Clock::calibrate() { clock_gettime(CLOCK_MONOTONIC, &tv); return tv.tv_nsec + tv.tv_sec*1000000000ull; */ + const auto steady_before = std::chrono::steady_clock::now(); device.vtable.GetCalibratedTimestampsKHR(device.device, 2, std::data(infos), &calibrated_result.device, -- cgit v1.2.3