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

◆ write_state_descriptors()

void MayaFlux::Buffers::RelaxationStepProcessor::write_state_descriptors ( const std::shared_ptr< RelaxationGridBuffer > &  grid)
private

Issue direct ShaderFoundry descriptor writes for state_in and state_out against the grid's current front/back raw buffers.

Parameters
gridThe RelaxationGridBuffer whose state buffers are being bound.

Definition at line 26 of file RelaxationStepProcessor.cpp.

27{
28 auto& resources = grid->get_buffer_resources();
29 if (resources.back_buffers.size() < 2) {
30 return;
31 }
32
33 if (m_descriptor_set_ids.empty()) {
34 return;
35 }
36
38 const size_t bytes = grid->get_state_bytes();
39 foundry.update_descriptor_buffer(
40 m_descriptor_set_ids[0], 0, vk::DescriptorType::eStorageBuffer,
41 resources.back_buffers[grid->front_index()].buffer, 0, bytes);
42
43 foundry.update_descriptor_buffer(
44 m_descriptor_set_ids[0], 1, vk::DescriptorType::eStorageBuffer,
45 resources.back_buffers[grid->back_index()].buffer, 0, bytes);
46}
std::vector< Portal::Graphics::DescriptorSetID > m_descriptor_set_ids
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.

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

Referenced by on_descriptors_created(), and processing_function().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: