MayaFlux 0.4.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 94 of file UVFieldProcessor.cpp.

95{
96 if (m_descriptor_set_ids.empty()) {
97 return;
98 }
99
100 auto& foundry = Portal::Graphics::get_shader_foundry();
101
102 if (!m_texture)
103 return;
104
105 if (!m_sampler) {
107 m_sampler = forge.get_or_create(m_sampler_config);
108 }
109
110 if (!m_sampler) {
112 "UVFieldProcessor: sampler creation failed, texture will not be sampled");
113 return;
114 }
115
116 foundry.update_descriptor_image(
118 1,
119 m_texture->get_image_view(),
120 m_sampler,
121 vk::ImageLayout::eShaderReadOnlyOptimal);
122
124 "UVFieldProcessor: texture descriptor written (binding 1, view={:p}, sampler={:p})",
125 static_cast<void*>(static_cast<VkImageView>(m_texture->get_image_view())),
126 static_cast<void*>(static_cast<VkSampler>(m_sampler)));
127}
#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: