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

◆ ensure_buffer()

void MayaFlux::Yantra::GpuResourceManager::ensure_buffer ( size_t  index,
size_t  required_bytes 
)

Definition at line 196 of file GpuResourceManager.cpp.

197{
198 auto& vk_slot = m_impl->buffers[index];
199 if (vk_slot.allocated_bytes >= required_bytes) {
200 return;
201 }
202
203 auto& foundry = Portal::Graphics::get_shader_foundry();
204 allocate_slot(foundry.get_device(), foundry.get_physical_device(),
205 vk_slot, required_bytes);
206
207 m_buffer_slots[index].allocated_bytes = required_bytes;
208}
std::unique_ptr< GpuResourceManagerImpl > m_impl
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.

References MayaFlux::Portal::Graphics::get_shader_foundry(), m_buffer_slots, and m_impl.

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

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