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

◆ stage_native_bytes()

void MayaFlux::Yantra::GpuDispatchCore::stage_native_bytes ( size_t  binding_index,
const void *  data,
size_t  byte_size 
)
protected

Stage a flat native-typed byte buffer for FLOAT32 bindings, bypassing the double-to-float cast in flatten_channels_to_staging.

Intended for pixel data (uint8_t, uint16_t) and pre-converted float buffers that should reach the GPU without an intermediate double widening. Once staged, prepare_gpu_inputs will upload these bytes directly via upload_raw rather than the float staging path.

Calling this clears any previously staged native bytes for the slot. It does not affect m_binding_data (PASSTHROUGH) or m_staging_floats.

Parameters
binding_indexBinding slot. Must match a FLOAT32 INPUT binding.
dataRaw bytes in the element type the shader expects.
byte_sizeTotal byte count.

Definition at line 82 of file GpuDispatchCore.cpp.

83{
84 if (binding_index >= m_native_staging_bytes.size())
85 m_native_staging_bytes.resize(binding_index + 1);
86
87 m_native_staging_bytes.resize(byte_size);
88 std::memcpy(m_native_staging_bytes.data(), data, byte_size);
89}
std::vector< uint8_t > m_native_staging_bytes
Native-typed staging buffer.

References m_native_staging_bytes.