MayaFlux 1.0.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 507 of file GpuResourceManager.cpp.

511{
512 auto& unit = unit_for(key);
513 auto& foundry = Portal::Graphics::get_shader_foundry();
514
515 if (index >= unit.image_slots.size())
516 unit.image_slots.resize(index + 1);
517 unit.image_slots[index] = image;
518
519 foundry.update_descriptor_storage_image(
520 unit.descriptor_set_ids[spec.set],
521 spec.binding,
522 image->get_image_view(),
523 vk::ImageLayout::eGeneral);
524}
IO::ImageData image
Definition Decoder.cpp:47
uint32_t index
Definition VKDevice.cpp:122
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, index, MayaFlux::Portal::Graphics::GpuBufferBinding::set, and unit_for().

+ Here is the call graph for this function: