MayaFlux 0.4.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 603 of file ShaderFoundry.cpp.

610{
611 auto it = m_descriptor_sets.find(descriptor_set_id);
612 if (it == m_descriptor_sets.end()) {
613 return;
614 }
615
616 vk::DescriptorBufferInfo buffer_info;
617 buffer_info.buffer = buffer;
618 buffer_info.offset = offset;
619 buffer_info.range = size;
620
621 vk::WriteDescriptorSet write;
622 write.dstSet = it->second.descriptor_set;
623 write.dstBinding = binding;
624 write.dstArrayElement = 0;
625 write.descriptorCount = 1;
626 write.descriptorType = type;
627 write.pBufferInfo = &buffer_info;
628
629 get_device().updateDescriptorSets(1, &write, 0, nullptr);
630}
vk::Device get_device() const
Get logical device handle.
std::unordered_map< DescriptorSetID, DescriptorSetState > m_descriptor_sets

References get_device(), and m_descriptor_sets.

+ Here is the call graph for this function: