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

◆ as_uint16()

std::span< const uint16_t > MayaFlux::Kakshya::TextureContainer::as_uint16 ( uint32_t  layer = 0) const

Typed view over the uint16 variant.

Returns an empty span if the layer's variant is not uint16. 16-bit UNORM formats and half-float formats both reside here; for half-float, the uint16 bits are the IEEE-754 binary16 encoding.

Definition at line 536 of file TextureContainer.cpp.

537{
538 if (layer >= m_data.size())
539 return {};
540 ensure_cpu(layer);
541 const auto* v = std::get_if<std::vector<uint16_t>>(&m_data[layer]);
542 return v ? std::span<const uint16_t>(v->data(), v->size()) : std::span<const uint16_t> {};
543}
void ensure_cpu(uint32_t layer) const
Download a GPU-held layer into m_data before a CPU read.

References ensure_cpu(), and m_data.

+ Here is the call graph for this function: