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

◆ dispatch_sequence()

void MayaFlux::Yantra::GpuResourceManager::dispatch_sequence ( const std::vector< std::string > &  keys,
const std::vector< std::array< uint32_t, 3 > > &  groups_per_key,
const std::vector< std::vector< uint8_t > > &  push_constants_per_key,
const std::vector< std::vector< Portal::Graphics::HazardResource > > &  hazards_per_key 
)

Record a dispatch for each requested key into one command buffer via ComputePress::record_sequence, submitted once.

Each key must already be initialise()'d. Vectors are parallel, indexed by position, one entry per key in the same order as keys.

Definition at line 695 of file GpuResourceManager.cpp.

700{
701 auto& foundry = Portal::Graphics::get_shader_foundry();
702 auto& compute_press = Portal::Graphics::get_compute_press();
703
704 std::vector<Portal::Graphics::ComputeStage> stages;
705 stages.reserve(keys.size());
706
707 for (size_t i = 0; i < keys.size(); ++i) {
708 auto& unit = unit_for(keys[i]);
709 stages.push_back(Portal::Graphics::ComputeStage {
710 .pipeline_id = unit.pipeline_id,
711 .descriptor_set_ids = unit.descriptor_set_ids,
712 .groups = groups_per_key[i],
713 .push_constant_data = push_constants_per_key[i],
714 .hazard_resources = hazards_per_key[i],
715 });
716 }
717
718 auto cmd_id = foundry.begin_commands(
720 compute_press.record_sequence(cmd_id, stages);
721 foundry.submit_and_wait(cmd_id);
722}
PipelineUnit & unit_for(const std::string &key)
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.
MAYAFLUX_API ComputePress & get_compute_press()

References MayaFlux::Portal::Graphics::ShaderFoundry::COMPUTE, MayaFlux::Portal::Graphics::get_compute_press(), MayaFlux::Portal::Graphics::get_shader_foundry(), MayaFlux::Portal::Graphics::ComputeStage::pipeline_id, and unit_for().

Referenced by MayaFlux::Yantra::GpuDispatchCore::dispatch_core_dependency().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: