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

◆ dispatch_3d()

void MayaFlux::Core::VKComputePipeline::dispatch_3d ( vk::CommandBuffer  cmd,
uint32_t  width_elements,
uint32_t  height_elements,
uint32_t  depth_elements,
uint32_t  local_size_x,
uint32_t  local_size_y,
uint32_t  local_size_z 
) const

Dispatch compute workgroups in 3D with automatic calculation.

Parameters
cmdCommand buffer
width_elementsWidth in elements
height_elementsHeight in elements
depth_elementsDepth in elements
local_size_xWorkgroup width
local_size_yWorkgroup height
local_size_zWorkgroup depth

Definition at line 316 of file VKComputePipeline.cpp.

324{
325 if (local_size_x == 0 || local_size_y == 0 || local_size_z == 0) {
327 "Invalid workgroup size: {}x{}x{}", local_size_x, local_size_y, local_size_z);
328 return;
329 }
330
331 uint32_t workgroups_x = calculate_workgroups(width_elements, local_size_x);
332 uint32_t workgroups_y = calculate_workgroups(height_elements, local_size_y);
333 uint32_t workgroups_z = calculate_workgroups(depth_elements, local_size_z);
334 dispatch(cmd, workgroups_x, workgroups_y, workgroups_z);
335}
#define MF_ERROR(comp, ctx,...)
static uint32_t calculate_workgroups(uint32_t element_count, uint32_t workgroup_size)
Calculate number of workgroups needed.
void dispatch(vk::CommandBuffer cmd, uint32_t group_count_x, uint32_t group_count_y, uint32_t group_count_z) const
Dispatch compute workgroups.
@ GraphicsBackend
Graphics/visual rendering backend (Vulkan, OpenGL)
@ Core
Core engine, backend, subsystems.

References calculate_workgroups(), MayaFlux::Journal::Core, dispatch(), MayaFlux::Journal::GraphicsBackend, and MF_ERROR.

+ Here is the call graph for this function: