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

◆ update_descriptors()

void MayaFlux::Buffers::ShaderProcessor::update_descriptors ( )
private

Definition at line 480 of file ShaderProcessor.cpp.

481{
482 if (m_descriptor_set_ids.empty()) {
483 return;
484 }
485
486 auto& foundry = Portal::Graphics::get_shader_foundry();
487
488 for (const auto& [descriptor_name, buffer] : m_bound_buffers) {
489 auto binding_it = m_config.bindings.find(descriptor_name);
490 if (binding_it == m_config.bindings.end()) {
491 continue;
492 }
493
494 const auto& binding = binding_it->second;
495
496 if (binding.set >= m_descriptor_set_ids.size()) {
498 "Invalid descriptor set index {} for binding '{}'",
499 binding.set, descriptor_name);
500 continue;
501 }
502
503 foundry.update_descriptor_buffer(
504 m_descriptor_set_ids[binding.set],
505 binding.binding,
506 binding.type,
507 buffer->get_buffer(),
508 0,
509 buffer->get_size_bytes());
510 }
511}
#define MF_ERROR(comp, ctx,...)
std::unordered_map< std::string, std::shared_ptr< VKBuffer > > m_bound_buffers
std::vector< Portal::Graphics::DescriptorSetID > m_descriptor_set_ids
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.
std::unordered_map< std::string, ShaderBinding > bindings

References MayaFlux::Buffers::ShaderProcessorConfig::bindings, MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Portal::Graphics::get_shader_foundry(), m_bound_buffers, m_config, m_descriptor_set_ids, and MF_ERROR.

Referenced by initialize_descriptors(), and processing_function().

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