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

◆ record_sequence_commands()

Portal::Graphics::CommandBufferID MayaFlux::Yantra::GpuResourceManager::record_sequence_commands ( 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,
const std::vector< Portal::Graphics::IndirectDispatch > &  indirect_per_key 
)
private

Record one command buffer holding a dispatch per key, with the barriers each stage's hazards owe the next.

Shared by dispatch_sequence and dispatch_sequence_async, which differ only in how they submit the returned buffer.

Definition at line 822 of file GpuResourceManager.cpp.

828{
829 auto& foundry = Portal::Graphics::get_shader_foundry();
830 auto& compute_press = Portal::Graphics::get_compute_press();
831
832 std::vector<Portal::Graphics::ComputeStage> stages;
833 stages.reserve(keys.size());
834
835 for (size_t i = 0; i < keys.size(); ++i) {
836 auto& unit = unit_for(keys[i]);
837 stages.push_back(Portal::Graphics::ComputeStage {
838 .pipeline_id = unit.pipeline_id,
839 .descriptor_set_ids = unit.descriptor_set_ids,
840 .groups = groups_per_key[i],
841 .push_constant_data = push_constants_per_key[i],
842 .hazard_resources = hazards_per_key[i],
843 .indirect = i < indirect_per_key.size() ? indirect_per_key[i] : Portal::Graphics::IndirectDispatch {},
844 });
845 }
846
847 auto cmd_id = foundry.begin_commands(
849 compute_press.record_sequence(cmd_id, stages);
850 return cmd_id;
851}
PipelineUnit & unit_for(const std::string &key)
@ Portal
High-level user-facing API layer.
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.
MAYAFLUX_API ComputePress & get_compute_press()
static constexpr DomainSpec Graphics
Domain constant for Graphics domain.
Definition Creator.hpp:444

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 dispatch_sequence(), and dispatch_sequence_async().

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