668{
670 return;
671 }
672
674 auto& descriptor_bindings = buffer->get_pipeline_context().descriptor_buffer_bindings;
675
676 std::set<std::pair<uint32_t, uint32_t>> updated_pairs;
677
678 for (const auto& binding : descriptor_bindings) {
680 if (!ds_index) {
682 "Descriptor set index {} out of range or reserved", binding.set);
683 continue;
684 }
685
686 foundry.update_descriptor_buffer(
688 binding.binding,
689 binding.type,
690 binding.buffer_info.buffer,
691 binding.buffer_info.offset,
692 binding.buffer_info.range);
693
694 updated_pairs.emplace(binding.set, binding.binding);
695 }
696
700 continue;
701 }
702
703 const auto& binding = binding_it->second;
704 auto key = std::make_pair(binding.set, binding.binding);
705
706 if (updated_pairs.count(key)) {
707 continue;
708 }
709
711 if (!ds_index) {
713 "Invalid descriptor set index {} for binding '{}'",
714 binding.set, descriptor_name);
715 continue;
716 }
717
718 foundry.update_descriptor_buffer(
720 binding.binding,
721 binding.type,
722 buf->get_buffer(),
723 0,
724 buf->get_size_bytes());
725 }
726}
#define MF_ERROR(comp, ctx,...)
#define MF_RT_ERROR(comp, ctx,...)
std::optional< uint32_t > resolve_ds_index(uint32_t set) const
Resolve logical descriptor set index to actual index.
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