400{
402 return;
403 }
404
406 auto& descriptor_bindings = buffer->get_pipeline_context().descriptor_buffer_bindings;
407
408 std::set<std::pair<uint32_t, uint32_t>> updated_pairs;
409
410 for (const auto& binding : descriptor_bindings) {
412 if (!ds_index) {
414 "Descriptor set index {} out of range or reserved", binding.set);
415 continue;
416 }
417
418 foundry.update_descriptor_buffer(
420 binding.binding,
421 binding.type,
422 binding.buffer_info.buffer,
423 binding.buffer_info.offset,
424 binding.buffer_info.range);
425
426 updated_pairs.emplace(binding.set, binding.binding);
427 }
428
432 continue;
433 }
434
435 const auto& binding = binding_it->second;
436 auto key = std::make_pair(binding.set, binding.binding);
437
438 if (updated_pairs.count(key)) {
439 continue;
440 }
441
443 if (!ds_index) {
445 "Invalid descriptor set index {} for binding '{}'",
446 binding.set, descriptor_name);
447 continue;
448 }
449
450 foundry.update_descriptor_buffer(
452 binding.binding,
453 binding.type,
454 buf->get_buffer(),
455 0,
456 buf->get_size_bytes());
457 }
458}
#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