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

◆ collect_push_writes()

void MayaFlux::Buffers::NetworkStateFieldProcessor::collect_push_writes ( const std::shared_ptr< VKBuffer > & buffer,
std::vector< Portal::Graphics::PushDescriptorWrite > & writes )
overrideprotectedvirtual

Push every binding in the table for the current buffer state.

Parameters
bufferThe attached buffer.
writesReceives the parent's writes, then one per table entry.

The primary vertex buffer's handle can change on resize and state fields may have swapped, so the handles are resolved again on every dispatch, the same reasoning VolumeFieldProcessor applies.

Reimplemented from MayaFlux::Buffers::ComputeProcessor.

Definition at line 150 of file SpatialHashProcessor.cpp.

153{
155
156 if (!m_buffer) {
157 return;
158 }
159
160 for (const auto& entry : m_bindings) {
161 vk::Buffer handle {};
162 size_t bytes = 0;
163
164 if (entry.field.empty()) {
165 handle = m_buffer->get_buffer();
166 bytes = m_buffer->get_size_bytes();
167 } else {
168 handle = m_buffer->read_state_handle(entry.field);
169 bytes = m_buffer->get_state_bytes(entry.field);
170 }
171
172 writes.push_back({
173 .binding = entry.binding,
175 .buffer = vk::DescriptorBufferInfo(handle, 0, bytes),
176 });
177 }
178}
virtual void collect_push_writes(const std::shared_ptr< VKBuffer > &buffer, std::vector< Portal::Graphics::PushDescriptorWrite > &writes)
Collect the writes for the push descriptor set, set 0.
std::shared_ptr< NetworkGeometryBuffer > m_buffer
@ STORAGE
Large arrays or buffers the shader may write (SSBO).
vk::DescriptorType to_vk_descriptor_type(DescriptorRole role)
Convert DescriptorRole to the corresponding vk::DescriptorType.

References MayaFlux::Buffers::ComputeProcessor::collect_push_writes(), m_bindings, m_buffer, MayaFlux::Portal::Graphics::STORAGE, and MayaFlux::Portal::Graphics::to_vk_descriptor_type().

Here is the call graph for this function: