MayaFlux 1.0.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 755 of file ShaderFoundry.cpp.

762{
763 auto it = m_descriptor_sets.find(descriptor_set_id);
764 if (it == m_descriptor_sets.end()) {
765 return;
766 }
767
768 vk::DescriptorBufferInfo buffer_info;
769 buffer_info.buffer = buffer;
770 buffer_info.offset = offset;
771 buffer_info.range = size;
772
773 vk::WriteDescriptorSet write;
774 write.dstSet = it->second.descriptor_set;
775 write.dstBinding = binding;
776 write.dstArrayElement = 0;
777 write.descriptorCount = 1;
778 write.descriptorType = type;
779 write.pBufferInfo = &buffer_info;
780
781 get_device().updateDescriptorSets(1, &write, 0, nullptr);
782}
uint64_t offset
Definition Composite.cpp:10
bool size
std::shared_ptr< NetworkGeometryBuffer > buffer
vk::PhysicalDeviceType type
Definition VKDevice.cpp:126
vk::Device get_device() const
Get logical device handle.
std::unordered_map< DescriptorSetID, DescriptorSetState > m_descriptor_sets

References buffer, get_device(), m_descriptor_sets, offset, size, and type.

Referenced by MayaFlux::Buffers::VolumeSurfaceProcessor::write_field_descriptor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: