369{
371 return;
372 }
373
375 auto& descriptor_bindings = buffer->get_pipeline_context().descriptor_buffer_bindings;
376
377 std::set<std::pair<uint32_t, uint32_t>> updated_pairs;
378
379 for (const auto& binding : descriptor_bindings) {
381 if (!ds_index) {
383 "Descriptor set index {} out of range or reserved", binding.set);
384 continue;
385 }
386
387 foundry.update_descriptor_buffer(
389 binding.binding,
390 binding.type,
391 binding.buffer_info.buffer,
392 binding.buffer_info.offset,
393 binding.buffer_info.range);
394
395 updated_pairs.emplace(binding.set, binding.binding);
396 }
397
401 continue;
402 }
403
404 const auto& binding = binding_it->second;
405 auto key = std::make_pair(binding.set, binding.binding);
406
407 if (updated_pairs.count(key)) {
408 continue;
409 }
410
412 if (!ds_index) {
414 "Invalid descriptor set index {} for binding '{}'",
415 binding.set, descriptor_name);
416 continue;
417 }
418
419 foundry.update_descriptor_buffer(
421 binding.binding,
422 binding.type,
423 buf->get_buffer(),
424 0,
425 buf->get_size_bytes());
426 }
427}
#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