Coalesces adjacent paths sharing a concatenable topology into one run.
Strip and fan paths are always reported separately.
268{
269 std::vector<DrawRun> runs;
270 uint32_t offset = 0;
271
272 for (
const auto& path :
m_paths) {
273 const auto count =
static_cast<uint32_t
>(path->get_vertex_count());
274 const auto topo = path->get_primitive_topology();
275
277 runs.back().vertex_count +=
count;
278 } else {
279 runs.push_back(
DrawRun { .topology = topo, .vertex_offset = offset, .vertex_count =
count });
280 }
281
283 }
284
285 return runs;
286}
std::vector< std::shared_ptr< GpuSync::PathGeneratorNode > > m_paths
std::vector< double > count(std::span< const double > data, size_t n_windows, uint32_t hop_size, uint32_t window_size)
Sample count per window (as double for pipeline uniformity).
constexpr bool is_concatenable_topology(PrimitiveTopology topology) noexcept
Whether two adjacent spans of this topology can be concatenated without altering the primitives they ...
Portal::Graphics::DrawRun DrawRun