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

◆ collect_push_writes()

void MayaFlux::Buffers::VolumeFieldProcessor::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 slot assignment.

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

Read slots change whenever an upstream stage swaps, so the handles are resolved again on every dispatch.

Reimplemented from MayaFlux::Buffers::ComputeProcessor.

Definition at line 205 of file VolumeFieldProcessor.cpp.

208{
210
211 if (!m_volume) {
212 return;
213 }
214
215 for (const auto& entry : m_bindings) {
216 writes.push_back({
217 .binding = entry.binding,
219 .buffer = vk::DescriptorBufferInfo(
220 entry.access == FieldAccess::READ
221 ? m_volume->read_handle(entry.field)
222 : m_volume->write_handle(entry.field),
223 0, m_volume->get_field_bytes(entry.field)),
224 });
225 }
226}
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< VolumeGridBuffer > m_volume
The attached volume, null until on_attach validates it.
@ READ
Resolves to VolumeGridBuffer::read_handle.
@ 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_volume, READ, MayaFlux::Portal::Graphics::STORAGE, and MayaFlux::Portal::Graphics::to_vk_descriptor_type().

Here is the call graph for this function: