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

◆ build()

ShaderSpec MayaFlux::Portal::Graphics::ShaderSpec::Assemble::build ( )
inline

Finalise and return the ShaderSpec.

Definition at line 516 of file ShaderSpec.hpp.

517 {
518 uint32_t pc_bytes = 0;
519 for (const auto& f : m_pc_fields)
520 pc_bytes += Kakshya::gpu_data_format_bytes(f.format);
521
522 if (m_kernel.has_value() && m_kernel->param_names.empty()) {
523 auto& names = m_kernel->param_names;
524 names.reserve(m_bindings.size() + m_pc_fields.size() + 1);
525 for (const auto& b : m_bindings)
526 names.push_back(b.name);
527 for (const auto& f : m_pc_fields)
528 names.push_back(f.name);
529 names.emplace_back("i");
530 }
531
532 return ShaderSpec {
533 .tmpl = m_tmpl,
534 .op = m_op,
535 .bindings = std::move(m_bindings),
536 .pc_fields = std::move(m_pc_fields),
537 .workgroup_size = m_workgroup,
538 .push_constant_bytes = pc_bytes,
539 .functions = std::move(m_functions),
540 .kernel = std::move(m_kernel),
541 };
542 }
size_t b
std::string name
Definition VKDevice.cpp:143
std::vector< PushConstantField > m_pc_fields
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.
size_t gpu_data_format_bytes(GpuDataFormat fmt) noexcept
Byte size of one element of a GpuDataFormat.
Definition NDData.cpp:9

References b, MayaFlux::Kakshya::gpu_data_format_bytes(), m_bindings, m_functions, m_kernel, m_op, m_pc_fields, m_tmpl, m_workgroup, and MayaFlux::Portal::Graphics::ShaderSpec::tmpl.

Referenced by MayaFlux::Nodes::Network::GpuFieldOperator::build_spec(), MayaFlux::Yantra::VisionGpuExecutor::config(), MayaFlux::Buffers::RelaxationSpecs::emit_binary(), MayaFlux::Buffers::RelaxationSpecs::emit_scalar_ramp(), and MayaFlux::Buffers::RelaxationSpecs::jacobi_diffusion().

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