Blender V4.5
vk_scheduler.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
11
12#pragma once
13
14#include "BLI_vector.hh"
15
16#include "vk_common.hh"
18
20class VKRenderGraph;
21
47 private:
52 Vector<NodeHandle> result_;
53
54 public:
63
64 private:
65 void reorder_nodes(const VKRenderGraph &render_graph);
66
73 void move_initial_transfer_to_start(const VKRenderGraph &render_graph);
74
91 void move_transfer_and_dispatch_outside_rendering_scope(const VKRenderGraph &render_graph);
92
96 std::optional<std::pair<int64_t, int64_t>> find_rendering_scope(
97 const VKRenderGraph &render_graph, IndexRange search_range) const;
98 template<typename FuncT>
99 void foreach_rendering_scope(const VKRenderGraph &render_graph, const FuncT &func) const
100 {
101 for (std::optional<std::pair<int64_t, int64_t>> rendering_scope =
102 find_rendering_scope(render_graph, IndexRange(result_.index_range()));
103 rendering_scope.has_value();
104 rendering_scope =
105 find_rendering_scope(render_graph,
106 IndexRange(rendering_scope.value().second + 1,
107 result_.size() - rendering_scope.value().second - 1)))
108 {
109 func(rendering_scope.value().first, rendering_scope.value().second);
110 }
111 }
112
113 void debug_print(const VKRenderGraph &render_graph) const;
114};
115
116} // namespace blender::gpu::render_graph
Span< NodeHandle > select_nodes(const VKRenderGraph &render_graph)