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

◆ collect_push_writes()

void MayaFlux::Buffers::UVFieldProcessor::collect_push_writes ( const std::shared_ptr< VKBuffer > & buffer,
std::vector< Portal::Graphics::PushDescriptorWrite > & writes )
overrideprotectedvirtual

Collect the writes for the push descriptor set, set 0.

Parameters
bufferBuffer under processing.
writesReceives one entry per binding of set 0.

Called once per dispatch, after the pipeline is bound, so a binding that changes between cycles needs no descriptor rewrite. The default pushes the buffer's staged set 0 bindings and the bound buffers whose config binding is in set 0. Subclasses that resolve handles per cycle (field generations, ping-pong state, textures) call the parent, then append their own writes.

Reimplemented from MayaFlux::Buffers::ComputeProcessor.

Definition at line 103 of file UVFieldProcessor.cpp.

106{
108
109 if (!m_texture) {
110 return;
111 }
112
113 if (!m_sampler) {
115 m_sampler = forge.get_or_create(m_sampler_config);
116 }
117
118 if (!m_sampler) {
120 "UVFieldProcessor: sampler creation failed, texture will not be sampled");
121 return;
122 }
123
124 writes.push_back({
125 .binding = 1,
126 .type = vk::DescriptorType::eCombinedImageSampler,
127 .image = vk::DescriptorImageInfo(
128 m_sampler, m_texture->get_image_view(), vk::ImageLayout::eShaderReadOnlyOptimal),
129 });
130}
#define MF_RT_ERROR(comp, ctx,...)
virtual void collect_push_writes(const std::shared_ptr< VKBuffer > &buffer, std::vector< Portal::Graphics::PushDescriptorWrite > &writes)
Collect the writes for the push descriptor set, set 0.
Portal::Graphics::SamplerConfig m_sampler_config
std::shared_ptr< Core::VKImage > m_texture
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains).
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Buffers::ComputeProcessor::collect_push_writes(), MayaFlux::Portal::Graphics::SamplerForge::instance(), m_sampler, m_sampler_config, m_texture, and MF_RT_ERROR.

Here is the call graph for this function: