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

◆ prepare_output_image()

void MayaFlux::Yantra::TextureExecutionContext::prepare_output_image ( uint32_t  width,
uint32_t  height 
)
inline

Allocates the output storage image and stages it at the declared output binding.

Only called in CONTAINER or IMAGE mode, from on_before_gpu_dispatch or per-step by callers chaining multi-pass sequences. Caches by dimension: reallocates only when width or height change from the previously staged output.

Definition at line 355 of file TextureExecutionContext.hpp.

356 {
357 auto& slot = output_slot();
358 if (!slot.image || slot.width != width || slot.height != height) {
361 slot.width = width;
362 slot.height = height;
363 }
364 stage_image_at(slot.binding.binding, slot.image, GpuBufferBinding::ElementType::IMAGE_STORAGE);
365 }
uint32_t width
Definition Decoder.cpp:66
uint32_t height
std::shared_ptr< Core::VKImage > create_storage_image(uint32_t width, uint32_t height, ImageFormat format=ImageFormat::RGBA8)
Create a storage image (compute shader read/write)
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.
ImageSlot & output_slot()
Find the declared output image slot.

References height, and width.