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

◆ flush_typed_push_constant()

void MayaFlux::Buffers::FormaBindingsProcessor::flush_typed_push_constant ( const std::string &  name,
const Kakshya::GpuValue &  value,
const PushConstantTarget &  pc,
const std::shared_ptr< VKBuffer > &  buffer 
)
private

Definition at line 278 of file FormaBindingsProcessor.cpp.

283{
284 auto& entries = buffer->get_pipeline_context().push_constant_bindings;
286
287 auto it = std::ranges::find_if(entries, [&](const auto& e) {
288 return e.offset == pc.offset;
289 });
290
291 if (it == entries.end()) {
292 entries.push_back(Portal::Graphics::PushConstantBindingInfo {
293 .offset = pc.offset,
294 .data = std::vector<uint8_t>(width),
295 .name = name });
296 it = std::prev(entries.end());
297 } else if (it->data.size() != width) {
298 it->data.resize(width);
299 }
300
302 std::span<std::byte>(reinterpret_cast<std::byte*>(it->data.data()), it->data.size()));
303}
std::shared_ptr< NetworkGeometryBuffer > buffer
glm::vec3 value
std::string name
Definition VKDevice.cpp:123
uint32_t width
size_t gpu_data_format_bytes(GpuDataFormat fmt) noexcept
Byte size of one element of a GpuDataFormat.
GpuDataFormat gpu_value_format(const GpuValue &value) noexcept
The GpuDataFormat of the value held.
size_t gpu_value_write(const GpuValue &value, std::span< std::byte > out) noexcept
Copies the held value's bytes into out, unconverted.

References buffer, MayaFlux::Kakshya::gpu_data_format_bytes(), MayaFlux::Kakshya::gpu_value_format(), MayaFlux::Kakshya::gpu_value_write(), name, MayaFlux::Buffers::FormaBindingsProcessor::PushConstantTarget::offset, MayaFlux::Portal::Graphics::PushConstantBindingInfo::offset, value, and width.

Referenced by execute_shader().

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