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

◆ stage_image()

void MayaFlux::Yantra::TextureExecutionContext::stage_image ( const std::shared_ptr< Core::VKImage > &  image,
vk::Sampler  sampler = nullptr 
)
inline

Stage an arbitrary VKImage at the declared input image binding.

Bypasses container resolution. The image must be in eShaderReadOnlyOptimal layout for IMAGE_SAMPLED access, or eGeneral for IMAGE_STORAGE access. Use before dispatch_async when the source is a render-pass output or camera frame rather than a container.

Parameters
imageInitialized VKImage.
samplerVulkan sampler. Defaults to the TextureLoom linear sampler when nullptr. Ignored for IMAGE_STORAGE access.

Definition at line 316 of file TextureExecutionContext.hpp.

319 {
320 auto& slot = input_slot();
321 if (slot.binding.element_type == GpuBufferBinding::ElementType::IMAGE_STORAGE) {
323 } else {
324 auto s = sampler
325 ? sampler
328 }
329 slot.image = image;
330 m_pending_container = nullptr;
331 }
IO::ImageData image
Definition Decoder.cpp:47
vk::Sampler get_default_linear()
Get a default linear sampler.
void stage_image_at(size_t binding_index, std::shared_ptr< Core::VKImage > image, GpuBufferBinding::ElementType kind, vk::Sampler sampler=nullptr)
Register a VKImage at an explicit binding index.
std::shared_ptr< Kakshya::TextureContainer > m_pending_container
ImageSlot & input_slot()
Find the declared input image slot.

References image.