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

◆ on_descriptors_created()

void MayaFlux::Buffers::UVFieldProcessor::on_descriptors_created ( )
overrideprotectedvirtual

Called after descriptor sets are created.

Override for custom descriptor updates.

Reimplemented from MayaFlux::Buffers::ShaderProcessor.

Definition at line 95 of file UVFieldProcessor.cpp.

96{
97 if (m_descriptor_set_ids.empty()) {
98 return;
99 }
100
101 auto& foundry = Portal::Graphics::get_shader_foundry();
102
103 if (!m_texture)
104 return;
105
106 if (!m_sampler) {
108 m_sampler = forge.get_or_create(m_sampler_config);
109 }
110
111 if (!m_sampler) {
113 "UVFieldProcessor: sampler creation failed, texture will not be sampled");
114 return;
115 }
116
117 foundry.update_descriptor_image(
119 1,
120 m_texture->get_image_view(),
121 m_sampler,
122 vk::ImageLayout::eShaderReadOnlyOptimal);
123
125 "UVFieldProcessor: texture descriptor written (binding 1, view={:p}, sampler={:p})",
126 static_cast<void*>(static_cast<VkImageView>(m_texture->get_image_view())),
127 static_cast<void*>(static_cast<VkSampler>(m_sampler)));
128}
#define MF_ERROR(comp, ctx,...)
#define MF_DEBUG(comp, ctx,...)
std::vector< Portal::Graphics::DescriptorSetID > m_descriptor_set_ids
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.
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Portal::Graphics::get_shader_foundry(), MayaFlux::Portal::Graphics::SamplerForge::instance(), MayaFlux::Buffers::ShaderProcessor::m_descriptor_set_ids, m_sampler, m_sampler_config, m_texture, MF_DEBUG, and MF_ERROR.

+ Here is the call graph for this function: