aboutsummaryrefslogtreecommitdiff
path: root/src/strategies/low_latency2/queue_strategy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/strategies/low_latency2/queue_strategy.cc')
-rw-r--r--src/strategies/low_latency2/queue_strategy.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/strategies/low_latency2/queue_strategy.cc b/src/strategies/low_latency2/queue_strategy.cc
index e67d279..855ff5d 100644
--- a/src/strategies/low_latency2/queue_strategy.cc
+++ b/src/strategies/low_latency2/queue_strategy.cc
@@ -1,4 +1,8 @@
#include "queue_strategy.hh"
+#include "helper.hh"
+
+#include <ranges>
+#include <span>
namespace low_latency {
@@ -15,4 +19,26 @@ void LowLatency2QueueStrategy::notify_submit(
[[maybe_unused]] const VkSubmitInfo2& submit,
[[maybe_unused]] std::unique_ptr<Submission> submission) {}
+void LowLatency2QueueStrategy::notify_present(const VkPresentInfoKHR& present) {
+
+ const auto pid =
+ find_next<VkPresentIdKHR>(&present, VK_STRUCTURE_TYPE_PRESENT_ID_KHR);
+
+ // All submissions should be tagged with a present_id. If it isn't, I'm not
+ // going to fail hard here - we will just ignore it.
+ if (!pid) {
+ return;
+ }
+
+ const auto swapchains =
+ std::span{present.pSwapchains, present.swapchainCount};
+ const auto present_ids =
+ std::span{pid->pPresentIds, present.swapchainCount};
+ for (const auto& [swapchain, present_id] :
+ std::views::zip(swapchains, present_ids)) {
+
+ // TODO
+ }
+}
+
} // namespace low_latency