Stage each of stages in turn and hand its dispatch key, groups, push constants and indirect source to on_stage, then restore the context's own config, bindings and staged data.
462{
469
470 for (const auto& stage : stages) {
478
479 stage.stage_fn(*this);
480
484 std::source_location::current(),
485 "GpuDispatchCore: failed to initialise key '{}' for a dependency stage",
486 stage.config.shader_path);
487 }
488
490
492
493 Portal::Graphics::IndirectDispatch indirect;
494 if (stage.indirect_groups) {
495 indirect.buffer =
m_resources.shared_buffer_handle(stage.indirect_groups->set, stage.indirect_groups->binding).buffer;
496 indirect.offset = stage.indirect_groups->offset_bytes;
497 }
498
500 }
501
509}
std::vector< ImageBinding > m_image_bindings
GpuResourceManager m_resources
virtual std::array< uint32_t, 3 > calculate_dispatch_size(size_t total_elements, const DataStructureInfo &structure_info) const
Calculate workgroup dispatch counts from structure dimensions.
GpuComputeConfig m_gpu_config
std::vector< GpuBufferBinding > declared_bindings() const
declare_buffer_bindings less the bindings the current unit's layout does not hold.
std::vector< uint8_t > m_push_constants
std::vector< std::vector< uint8_t > > m_binding_data
std::vector< GpuBufferBinding > m_bindings
bool ensure_gpu_ready()
Ensure GPU resources are initialised.
void bind_all_descriptors()
virtual void prepare_gpu_inputs(const std::vector< std::vector< double > > &channels, const DataStructureInfo &structure_info)
Marshal channel data into GPU input buffers.
std::vector< std::vector< uint8_t > > m_passthrough_bytes
size_t m_prepared_elements
Element count of the dispatch most recently prepared.
void update_dispatch_key_cache()
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains).
@ Yantra
DSP algorithms, computational units, matrix operations, Grammar.
Portal::Graphics::GpuComputeConfig GpuComputeConfig