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

◆ write_field_descriptors()

void MayaFlux::Buffers::NetworkStateFieldProcessor::write_field_descriptors ( )
private

Issue descriptor writes for every entry in the binding table.

Definition at line 150 of file SpatialHashProcessor.cpp.

151{
152 if (!m_buffer || m_descriptor_set_ids.empty()) {
153 return;
154 }
155
156 auto& foundry = Portal::Graphics::get_shader_foundry();
157
158 for (const auto& entry : m_bindings) {
159 vk::Buffer handle {};
160 size_t bytes = 0;
161
162 if (entry.field.empty()) {
163 handle = m_buffer->get_buffer();
164 bytes = m_buffer->get_size_bytes();
165 } else {
166 handle = m_buffer->read_state_handle(entry.field);
167 bytes = m_buffer->get_state_bytes(entry.field);
168 }
169
170 foundry.update_descriptor_buffer(
171 m_descriptor_set_ids[0], entry.binding, vk::DescriptorType::eStorageBuffer,
172 handle, 0, bytes);
173 }
174}
std::shared_ptr< NetworkGeometryBuffer > m_buffer
std::vector< Portal::Graphics::DescriptorSetID > m_descriptor_set_ids
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.

References MayaFlux::Portal::Graphics::get_shader_foundry(), m_bindings, m_buffer, and MayaFlux::Buffers::ShaderProcessor::m_descriptor_set_ids.

Referenced by on_descriptors_created(), and processing_function().

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