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

◆ upload_data() [2/2]

void MayaFlux::Portal::Graphics::TextureLoom::upload_data ( const std::shared_ptr< Core::VKImage > &  image,
const void *  data,
size_t  size,
const std::shared_ptr< Buffers::VKBuffer > &  staging 
)

Upload pixel data reusing a caller-supplied persistent staging buffer.

Identical to upload_data() but skips the per-call VkBuffer allocation, eliminating the Vulkan object churn that causes VK_ERROR_DEVICE_LOST under sustained per-frame texture updates (e.g. video playback).

Parameters
imageTarget VKImage (must already be initialised).
dataPixel data pointer (at least size bytes).
sizeByte count — must match the image footprint.
stagingHost-visible staging VKBuffer from create_streaming_staging().

Definition at line 343 of file TextureLoom.cpp.

348{
349 if (!is_initialized() || !image || !data || !staging) {
351 "Invalid parameters for upload_data_streaming");
352 return;
353 }
354
355 m_resource_manager->upload_image_data_with_staging(image, data, size, staging);
356}
#define MF_ERROR(comp, ctx,...)
void upload_image_data_with_staging(std::shared_ptr< VKImage > image, const void *data, size_t size, const std::shared_ptr< Buffers::VKBuffer > &staging)
Upload image data using a caller-supplied persistent staging buffer.
Core::BackendResourceManager * m_resource_manager
bool is_initialized() const
Check if manager is initialized.
@ ImageProcessing
Image processing tasks (filters, transformations)
@ Portal
High-level user-facing API layer.

References MayaFlux::Journal::ImageProcessing, is_initialized(), m_resource_manager, MF_ERROR, MayaFlux::Journal::Portal, and MayaFlux::Core::BackendResourceManager::upload_image_data_with_staging().

+ Here is the call graph for this function: