MayaFlux 0.5.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 302 of file TextureExecutionContext.hpp.

305 {
306 auto& slot = input_slot();
307 if (slot.binding.element_type == GpuBufferBinding::ElementType::IMAGE_STORAGE) {
309 } else {
310 auto s = sampler
311 ? sampler
314 }
315 slot.image = image;
316 m_pending_container = nullptr;
317 }
IO::ImageData image
Definition Decoder.cpp:64
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.