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

◆ update_descriptor_buffer()

void MayaFlux::Portal::Graphics::ShaderFoundry::update_descriptor_buffer ( DescriptorSetID  descriptor_set_id,
uint32_t  binding,
vk::DescriptorType  type,
vk::Buffer  buffer,
size_t  offset,
size_t  size 
)

Update descriptor set with buffer binding.

Parameters
descriptor_set_idID of descriptor set to update
bindingBinding index within the descriptor set
typeDescriptor type (e.g., eStorageBuffer, eUniformBuffer)
bufferVulkan buffer to bind
offsetOffset within the buffer
sizeSize of the buffer region

Definition at line 683 of file ShaderFoundry.cpp.

690{
691 auto it = m_descriptor_sets.find(descriptor_set_id);
692 if (it == m_descriptor_sets.end()) {
693 return;
694 }
695
696 vk::DescriptorBufferInfo buffer_info;
697 buffer_info.buffer = buffer;
698 buffer_info.offset = offset;
699 buffer_info.range = size;
700
701 vk::WriteDescriptorSet write;
702 write.dstSet = it->second.descriptor_set;
703 write.dstBinding = binding;
704 write.dstArrayElement = 0;
705 write.descriptorCount = 1;
706 write.descriptorType = type;
707 write.pBufferInfo = &buffer_info;
708
709 get_device().updateDescriptorSets(1, &write, 0, nullptr);
710}
float offset
vk::Device get_device() const
Get logical device handle.
std::unordered_map< DescriptorSetID, DescriptorSetState > m_descriptor_sets

References get_device(), m_descriptor_sets, and offset.

+ Here is the call graph for this function: