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

◆ processing_function()

void MayaFlux::Buffers::RelaxationEmitProcessor::processing_function ( const std::shared_ptr< Buffer > &  buffer)
overrideprotectedvirtual

Write the cell_state and vertices descriptors for the grid's current front generation, then run the normal shader processing path.

Implements MayaFlux::Buffers::BufferProcessor.

Definition at line 63 of file RelaxationEmitProcessor.cpp.

64{
65 auto grid = std::dynamic_pointer_cast<RelaxationGridBuffer>(buffer);
66 if (grid && are_descriptors_ready()) {
68 auto& resources = grid->get_buffer_resources();
69
70 foundry.update_descriptor_buffer(
71 m_descriptor_set_ids[0], 0, vk::DescriptorType::eStorageBuffer,
72 resources.back_buffers[grid->front_index()].buffer, 0, grid->get_state_bytes());
73
74 foundry.update_descriptor_buffer(
75 m_descriptor_set_ids[0], 1, vk::DescriptorType::eStorageBuffer,
76 grid->get_buffer(), 0, grid->get_size_bytes());
77 }
78
80}
virtual void processing_function(const std::shared_ptr< Buffer > &buffer)=0
The core processing function that must be implemented by derived classes.
bool are_descriptors_ready() const
Check if descriptors are initialized.
std::vector< Portal::Graphics::DescriptorSetID > m_descriptor_set_ids
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.

References MayaFlux::Buffers::ShaderProcessor::are_descriptors_ready(), MayaFlux::Portal::Graphics::get_shader_foundry(), MayaFlux::Buffers::ShaderProcessor::m_descriptor_set_ids, and MayaFlux::Buffers::BufferProcessor::processing_function().

+ Here is the call graph for this function: