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

◆ bind_image_storage()

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

Bind a storage image descriptor at the given slot index.

Parameters
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 286 of file GpuResourceManager.cpp.

290{
291 auto& foundry = Portal::Graphics::get_shader_foundry();
292
293 if (index >= m_image_slots.size())
294 m_image_slots.resize(index + 1);
295 m_image_slots[index] = image;
296
297 foundry.update_descriptor_storage_image(
298 m_descriptor_set_ids[spec.set],
299 spec.binding,
300 image->get_image_view(),
301 vk::ImageLayout::eGeneral);
302}
IO::ImageData image
Definition Decoder.cpp:57
std::vector< std::shared_ptr< Core::VKImage > > m_image_slots
std::vector< Portal::Graphics::DescriptorSetID > m_descriptor_set_ids
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.

References MayaFlux::Yantra::GpuBufferBinding::binding, MayaFlux::Portal::Graphics::get_shader_foundry(), image, m_descriptor_set_ids, m_image_slots, and MayaFlux::Yantra::GpuBufferBinding::set.

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

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