MayaFlux 0.5.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 211 of file StagingUtils.cpp.

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

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Registry::BackendRegistry::get_service(), MayaFlux::Registry::BackendRegistry::instance(), 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::RelaxationStepProcessor::on_after_execute(), 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: