diff options
| author | Nicolas James <nj3ahxac@gmail.com> | 2026-04-08 12:55:29 +1000 |
|---|---|---|
| committer | Nicolas James <nj3ahxac@gmail.com> | 2026-04-08 12:55:29 +1000 |
| commit | 453d5b0052bd17ed74d47570ffff403ffcd9ebb3 (patch) | |
| tree | 14ab71a5ff27d5485faea061f6e8fe26c0e19640 /src/strategies/low_latency2/queue_strategy.cc | |
| parent | eb9719cc8b9a308654ccd2c3bce8a7047b6e2a1a (diff) | |
Fix refactor latency regression for VK_NV_LowLatency2 by checking if work has already completed
Diffstat (limited to 'src/strategies/low_latency2/queue_strategy.cc')
| -rw-r--r-- | src/strategies/low_latency2/queue_strategy.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/strategies/low_latency2/queue_strategy.cc b/src/strategies/low_latency2/queue_strategy.cc index a020c0d..e3ed808 100644 --- a/src/strategies/low_latency2/queue_strategy.cc +++ b/src/strategies/low_latency2/queue_strategy.cc @@ -29,15 +29,14 @@ static void notify_submit_impl(LowLatency2QueueStrategy& strategy, const auto [iter, inserted] = strategy.frame_spans.try_emplace(present_id); if (inserted) { iter->second = std::make_unique<FrameSpan>(std::move(handle)); + // Add our present_id to our ring tracking if it's non-zero. + if (present_id) { + strategy.stale_present_ids.push_back(present_id); + } } else { iter->second->update(std::move(handle)); } - // Add our present_id to our ring tracking if it's non-zero. - if (inserted && present_id) { - strategy.stale_present_ids.push_back(present_id); - } - // Remove stale present_id's if they weren't presented to. if (std::size(strategy.stale_present_ids) > LowLatency2QueueStrategy::MAX_TRACKED_PRESENTS) { |
