From 18b77323841ba3853e6663757fd47ac3bb007eac Mon Sep 17 00:00:00 2001 From: Nicolas James Date: Mon, 30 Mar 2026 23:25:03 +1100 Subject: Turn on reflex by default for all swapchains --- src/layer.cc | 4 ++-- src/queue_context.cc | 2 +- src/queue_context.hh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layer.cc b/src/layer.cc index 78a63d3..186178a 100644 --- a/src/layer.cc +++ b/src/layer.cc @@ -743,7 +743,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR( // VK_NV_low_latency2 allows a swapchain to be created with the low latency // mode already on via VkSwapchainLatencyCreateInfoNV. - auto was_low_latency_requested = false; + auto was_low_latency_requested = true; // enable by default? if (const auto slci = find_next( pCreateInfo, VK_STRUCTURE_TYPE_SWAPCHAIN_LATENCY_CREATE_INFO_NV); slci) { @@ -832,7 +832,7 @@ void QueueNotifyOutOfBandNV(VkQueue queue, // enum even exists (I guess we will find out later when nothing works). const auto context = layer_context.get_context(queue); - context->should_ignore_latency = true; + context->is_out_of_band = true; } VkResult SetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, diff --git a/src/queue_context.cc b/src/queue_context.cc index 0356c5c..84b06fe 100644 --- a/src/queue_context.cc +++ b/src/queue_context.cc @@ -115,7 +115,7 @@ bool QueueContext::should_inject_timestamps() const { } // Don't do it if we've been marked as 'out of band' by nvidia's extension. - if (this->should_ignore_latency) { + if (this->is_out_of_band) { return false; } diff --git a/src/queue_context.hh b/src/queue_context.hh index 873a85a..be73adc 100644 --- a/src/queue_context.hh +++ b/src/queue_context.hh @@ -51,7 +51,7 @@ class QueueContext final : public Context { // NVIDIA's extension lets the application explicitly state that this queue // does not contribute to the frame. AMD's extension has no such mechanism - // so this will always be false when using VK_AMD_anti_lag. - bool should_ignore_latency = false; + bool is_out_of_band = false; public: // I want our queue bookkeeping to be fairly simple and do one thing - track -- cgit v1.2.3