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

256{
257 auto& foundry = Portal::Graphics::get_shader_foundry();
258
259 if (index >= m_image_slots.size())
260 m_image_slots.resize(index + 1);
261 m_image_slots[index] = image;
262
263 foundry.update_descriptor_storage_image(
264 m_descriptor_set_ids[spec.set],
265 spec.binding,
266 image->get_image_view(),
267 vk::ImageLayout::eGeneral);
268}
IO::ImageData image
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: