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

◆ push_ssbo_bindings()

void MayaFlux::Buffers::MeshNetworkProcessor::push_ssbo_bindings ( const std::shared_ptr< VKBuffer > &  buffer)
private

Definition at line 290 of file MeshNetworkProcessor.cpp.

291{
293 return;
294
295 auto& bindings = buffer->get_engine_context().ssbo_bindings;
296
297 auto push = [&](uint32_t binding_idx, const std::shared_ptr<VKBuffer>& ssbo) {
298 Portal::Graphics::DescriptorBindingInfo info;
299 info.set = 0;
300 info.binding = binding_idx;
301 info.type = vk::DescriptorType::eStorageBuffer;
302 info.buffer_info.buffer = ssbo->get_buffer();
303 info.buffer_info.offset = 0;
304 info.buffer_info.range = ssbo->get_size_bytes();
305
306 auto it = std::ranges::find_if(bindings, [&](const auto& b) {
307 return b.set == info.set && b.binding == info.binding;
308 });
309 if (it != bindings.end()) {
310 *it = info;
311 } else {
312 bindings.push_back(info);
313 }
314 };
315
316 push(1, m_model_ssbo);
317 push(2, m_slot_index_ssbo);
318}
size_t b
std::shared_ptr< VKBuffer > m_slot_index_ssbo
Per-vertex slot index. One uint32_t per concatenated vertex.
std::shared_ptr< VKBuffer > m_model_ssbo
Per-slot world matrices in sorted_indices order. One mat4 per slot.

References b, MayaFlux::Portal::Graphics::DescriptorBindingInfo::binding, MayaFlux::Portal::Graphics::DescriptorBindingInfo::buffer_info, m_model_ssbo, m_slot_index_ssbo, MayaFlux::Portal::Graphics::DescriptorBindingInfo::set, and MayaFlux::Portal::Graphics::DescriptorBindingInfo::type.

Referenced by processing_function().

+ Here is the caller graph for this function: