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

◆ stage_descriptor()

void MayaFlux::Buffers::RaymarchProcessor::stage_descriptor ( const std::shared_ptr< VKBuffer > &  buffer,
vk::Buffer  handle 
)
private

Insert or replace the descriptor entry for the field handle.

Parameters
bufferBuffer whose pipeline context is staged onto.
handleHandle resolved this cycle.

Definition at line 147 of file RaymarchProcessor.cpp.

149{
150 auto& bindings = buffer->get_pipeline_context().descriptor_buffer_bindings;
151
152 auto it = std::ranges::find_if(bindings, [this](const auto& entry) {
153 return entry.set == m_set && entry.binding == m_binding;
154 });
155
156 if (it == bindings.end()) {
157 bindings.push_back(Portal::Graphics::DescriptorBindingInfo {
158 .set = m_set,
159 .binding = m_binding,
160 .type = vk::DescriptorType::eStorageBuffer,
161 .buffer_info = vk::DescriptorBufferInfo(handle, 0, m_field_bytes),
162 .name = k_binding_name,
163 .count = 1,
164 });
165 return;
166 }
167
168 it->buffer_info.buffer = handle;
169 it->buffer_info.offset = 0;
170 it->buffer_info.range = m_field_bytes;
171}
std::shared_ptr< NetworkGeometryBuffer > buffer

References buffer, m_binding, m_field_bytes, m_set, and MayaFlux::Portal::Graphics::DescriptorBindingInfo::set.

Referenced by on_attach(), and processing_function().

+ Here is the caller graph for this function: