|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API void MayaFlux::Buffers::upload_to_gpu | ( | const void * | data, |
| size_t | size, | ||
| const std::shared_ptr< VKBuffer > & | target, | ||
| const std::shared_ptr< VKBuffer > & | staging = nullptr, | ||
| size_t | dst_offset = 0, | ||
| bool | awaited = false ) |
Upload raw data to GPU buffer (auto-detects host-visible vs device-local).
| data | Source data pointer |
| size | Size in bytes |
| target | Target GPU buffer |
| staging | Optional staging buffer (created if needed for device-local) |
Convenience wrapper over StagingUtils that:
| dst_offset | Byte offset into target to write at. The default 0 overwrites from the start; a nonzero value uploads a sub-range, leaving the rest of target as it was. |
| awaited | True when the caller has already waited for work using target, which skips the library-wide wait before a host write. Applies to host-visible targets only. A device-local target is always copied without blocking; the next write to staging waits for that copy only. |
Definition at line 768 of file StagingUtils.cpp.
References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, and create_staging_buffer().
Referenced by MayaFlux::Buffers::FormaBindingsProcessor::flush_descriptor(), MayaFlux::Buffers::NodeTextureProcessor::initialize_gpu_resources(), MayaFlux::IO::ImageReader::load_into_buffer(), MayaFlux::Buffers::AudioComputeProcessor::process_block(), MayaFlux::Buffers::AggregateBindingsProcessor::processing_function(), MayaFlux::Buffers::CompositeGeometryProcessor::processing_function(), MayaFlux::Buffers::NetworkGeometryProcessor::processing_function(), MayaFlux::Buffers::NetworkGeometryProcessor::try_incremental_upload(), MayaFlux::Buffers::DescriptorBindingsProcessor::update_from_buffer(), MayaFlux::Buffers::DescriptorBindingsProcessor::update_from_network(), MayaFlux::Buffers::DescriptorBindingsProcessor::update_from_node(), MayaFlux::Buffers::TextureProcessor::update_geometry_if_dirty(), upload_audio_to_gpu(), MayaFlux::Buffers::MeshNetworkProcessor::upload_combined(), upload_from_view(), MayaFlux::Buffers::TextureProcessor::upload_initial_geometry(), MayaFlux::Buffers::DataWriteProcessor::upload_raw(), upload_resizing(), MayaFlux::Buffers::DataWriteProcessor::upload_secondary(), upload_structured_view(), upload_to_gpu(), upload_to_gpu(), MayaFlux::Buffers::DataWriteProcessor::upload_vertex(), and MayaFlux::Buffers::DataWriteProcessor::write_buffer().