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

◆ stage_image_at()

void MayaFlux::Yantra::GpuDispatchCore::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.

Dispatches to the storage or sampled path based on kind. The image will be transitioned to eGeneral (STORAGE) or eShaderReadOnlyOptimal (SAMPLED) if not already there.

Parameters
binding_indexIndex matching the declared image binding.
imageInitialised VKImage.
kindIMAGE_STORAGE or IMAGE_SAMPLED.
samplerVulkan sampler handle. Required for IMAGE_SAMPLED, ignored for IMAGE_STORAGE.

Definition at line 68 of file GpuDispatchCore.cpp.

72{
73 if (binding_index >= m_image_bindings.size())
74 m_image_bindings.resize(binding_index + 1);
75 m_image_bindings[binding_index] = {
76 .image = std::move(image),
77 .sampler = (kind == GpuBufferBinding::ElementType::IMAGE_SAMPLED) ? sampler : nullptr,
78 .kind = kind,
79 };
80}
IO::ImageData image
Definition Decoder.cpp:64
std::vector< ImageBinding > m_image_bindings

References image, MayaFlux::Portal::Graphics::GpuBufferBinding::IMAGE_SAMPLED, and m_image_bindings.