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

◆ write_layer() [1/2]

void MayaFlux::Kriya::detail::write_layer ( const std::shared_ptr< Buffers::VKBuffer > &  target,
uint32_t  layer,
const Kakshya::DataVariant &  data 
)

Write a DataVariant into one layer of a layered buffer.

An empty variant is skipped, as when nothing has arrived yet. The bytes must match the layer's size, which the buffer reports when they do not.

Parameters
targetBuffer that passed accepts_layer_write.
layerLayer to replace.
dataFrame bytes.

Definition at line 98 of file PipelineGraphicsData.cpp.

102{
103 const auto array = std::dynamic_pointer_cast<Buffers::TextureArrayBuffer>(target);
104 const auto access = Kakshya::as_texture_access(data);
105 if (!array || !access || access->byte_count == 0) {
106 return;
107 }
108
109 array->submit_layer(layer,
110 std::span<const uint8_t>(static_cast<const uint8_t*>(access->data_ptr), access->byte_count));
111}

References MayaFlux::Kakshya::as_texture_access().

Referenced by MayaFlux::Kriya::BufferPipeline::process_route(), and MayaFlux::Kriya::BufferPipeline::queue_graphics_write().

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