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

◆ create_staging_buffer()

MAYAFLUX_API std::shared_ptr< VKBuffer > MayaFlux::Buffers::create_staging_buffer ( size_t  size)

Create staging buffer for transfers.

Parameters
sizeSize in bytes
Returns
Host-visible staging buffer ready for transfers

Definition at line 206 of file StagingUtils.cpp.

207{
208 auto buffer = std::make_shared<VKBuffer>(
209 size,
210 VKBuffer::Usage::STAGING,
211 Kakshya::DataModality::UNKNOWN);
212
213 auto buffer_service = Registry::BackendRegistry::instance()
214 .get_service<Registry::Service::BufferService>();
215 if (!buffer_service) {
216 error<std::runtime_error>(
217 Journal::Component::Buffers,
218 Journal::Context::BufferProcessing,
219 std::source_location::current(),
220 "create_staging_buffer requires a valid buffer service");
221 }
222
223 buffer_service->initialize_buffer(buffer);
224
225 return buffer;
226}
Backend buffer management service interface.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Registry::BackendRegistry::get_service(), MayaFlux::Registry::BackendRegistry::instance(), MayaFlux::Buffers::VKBuffer::STAGING, and MayaFlux::Kakshya::UNKNOWN.

Referenced by MayaFlux::Buffers::MeshProcessor::allocate_gpu_buffers(), MayaFlux::Buffers::MeshNetworkProcessor::allocate_gpu_buffers(), MayaFlux::Buffers::GeometryBindingsProcessor::bind_geometry_node(), MayaFlux::Buffers::NetworkGeometryProcessor::bind_network(), download_from_gpu(), download_from_gpu_async(), MayaFlux::Buffers::DataWriteProcessor::ensure_capacity(), MayaFlux::Buffers::FormaProcessor::on_attach(), MayaFlux::Buffers::InstanceSSBOProcessor::on_attach(), MayaFlux::Buffers::DataWriteProcessor::on_attach(), MayaFlux::Buffers::FormaProcessor::processing_function(), MayaFlux::Buffers::GeometryBindingsProcessor::upload_index_data(), and upload_to_gpu().

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