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

◆ on_iteration_barrier()

void MayaFlux::Buffers::DiffuseProcessor::on_iteration_barrier ( Portal::Graphics::CommandBufferID  cmd_id,
const std::shared_ptr< VKBuffer > &  buffer,
uint32_t  index 
)
overrideprotectedvirtual

Barrier both target slots and the scratch between passes.

Parameters
cmd_idCommand buffer being recorded into.
bufferBuffer under processing.
indexZero-based index of the pass just recorded.

Reimplemented from MayaFlux::Buffers::ComputeProcessor.

Definition at line 82 of file DiffuseProcessor.cpp.

86{
87 const auto& volume = get_volume();
88 if (!volume) {
89 return;
90 }
91
93
94 const auto src = vk::AccessFlagBits::eShaderWrite;
95 const auto dst = vk::AccessFlagBits::eShaderRead | vk::AccessFlagBits::eShaderWrite;
96 const auto stage = vk::PipelineStageFlagBits::eComputeShader;
97
98 foundry.buffer_barrier(cmd_id, volume->read_handle(m_target_field), src, dst, stage, stage);
99 foundry.buffer_barrier(cmd_id, volume->write_handle(m_target_field), src, dst, stage, stage);
100 foundry.buffer_barrier(cmd_id, volume->write_handle(m_scratch_field), src, dst, stage, stage);
101}
const std::shared_ptr< VolumeGridBuffer > & get_volume() const
The attached volume, or null if attachment failed validation.
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.

References MayaFlux::Portal::Graphics::get_shader_foundry(), MayaFlux::Buffers::VolumeFieldProcessor::get_volume(), m_scratch_field, and m_target_field.

+ Here is the call graph for this function: