MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ calculate_dispatch_size()

std::array< uint32_t, 3 > MayaFlux::Buffers::VertexFieldProcessor::calculate_dispatch_size ( const std::shared_ptr< VKBuffer > &  buffer)
overrideprotectedvirtual

One thread per record in the resolved range.

The generated kernel guards its own tail, so rounding up is safe.

Reimplemented from MayaFlux::Buffers::ComputeProcessor.

Definition at line 212 of file VertexFieldProcessor.cpp.

214{
215 const auto& dispatch = get_dispatch_config();
216 const uint32_t local_x = std::max(1U, dispatch.workgroup_x);
217 const uint32_t groups = (m_params.vertex_count + local_x - 1) / local_x;
218
219 return { std::max(1U, groups), 1U, 1U };
220}
const ShaderDispatchConfig & get_dispatch_config() const
Get current dispatch configuration.

References MayaFlux::Buffers::ComputeProcessor::get_dispatch_config(), m_params, and MayaFlux::Buffers::VertexFieldProcessor::RangeParams::vertex_count.

+ Here is the call graph for this function: