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

◆ gpu_value_write()

MAYAFLUX_API size_t MayaFlux::Kakshya::gpu_value_write ( const GpuValue &  value,
std::span< std::byte >  out 
)
noexcept

Copies the held value's bytes into out, unconverted.

Parameters
valueSource value.
outDestination, at least gpu_data_format_bytes(gpu_value_format(value)).
Returns
Bytes written, or 0 if out is too small.

Definition at line 112 of file GpuDataFormat.cpp.

113{
114 return std::visit([&](const auto& held) -> size_t {
115 if (out.size() < sizeof(held)) {
116 return 0;
117 }
118 std::memcpy(out.data(), &held, sizeof(held));
119 return sizeof(held);
120 },
121 value);
122}
std::vector< float > * out
glm::vec3 value

References out, and value.

Referenced by MayaFlux::Buffers::FormaBindingsProcessor::flush_typed_push_constant(), and MayaFlux::Buffers::ShaderProcessor::pump_feeds().

+ Here is the caller graph for this function: