MayaFlux 0.4.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,
bool  deferred = false 
)

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().
deferred.If true, record_deferred_commands will be used by the backend.

Definition at line 381 of file TextureLoom.cpp.

387{
388 if (!is_initialized() || !image || !data || !staging) {
390 "Invalid parameters for upload_data_streaming");
391 return;
392 }
393
394 m_resource_manager->upload_image_data(image, data, size, staging, deferred);
395}
#define MF_ERROR(comp, ctx,...)
IO::ImageData image
Definition Decoder.cpp:57
void upload_image_data(std::shared_ptr< VKImage > image, const void *data, size_t size)
Upload data to an image (creates staging buffer internally)
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 image, MayaFlux::Journal::ImageProcessing, is_initialized(), m_resource_manager, MF_ERROR, MayaFlux::Journal::Portal, and MayaFlux::Core::BackendResourceManager::upload_image_data().

+ Here is the call graph for this function: