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

◆ bind_image_storage()

void MayaFlux::Yantra::GpuResourceManager::bind_image_storage ( const std::string &  key,
size_t  index,
const std::shared_ptr< Core::VKImage > &  image,
const GpuBufferBinding spec 
)

Bind a storage image descriptor at the given slot index.

Parameters
keyPipeline unit to bind into.
indexSlot index matching the binding declaration.
imageVKImage to bind. Must be initialised and in eGeneral layout.
specBinding declaration. element_type must be IMAGE_STORAGE.

Definition at line 415 of file GpuResourceManager.cpp.

419{
420 auto& unit = unit_for(key);
421 auto& foundry = Portal::Graphics::get_shader_foundry();
422
423 if (index >= unit.image_slots.size())
424 unit.image_slots.resize(index + 1);
425 unit.image_slots[index] = image;
426
427 foundry.update_descriptor_storage_image(
428 unit.descriptor_set_ids[spec.set],
429 spec.binding,
430 image->get_image_view(),
431 vk::ImageLayout::eGeneral);
432}
IO::ImageData image
Definition Decoder.cpp:64
PipelineUnit & unit_for(const std::string &key)
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.

References MayaFlux::Portal::Graphics::GpuBufferBinding::binding, MayaFlux::Portal::Graphics::get_shader_foundry(), image, MayaFlux::Portal::Graphics::GpuBufferBinding::set, and unit_for().

Referenced by MayaFlux::Yantra::GpuDispatchCore::prepare_gpu_inputs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: