12 Kakshya::DataModality::UNKNOWN)
16 "Created DescriptorBuffer for shader '{}' ({} bytes)",
28 const std::string& name,
29 const std::shared_ptr<Nodes::Node>& node,
30 const std::string& descriptor_name,
34 error<std::logic_error>(
37 std::source_location::current(),
38 "DescriptorBuffer not initialized. Call initialize() first.");
46 const std::string& name,
47 const std::shared_ptr<Nodes::Node>& node,
48 const std::string& descriptor_name,
52 error<std::logic_error>(
55 std::source_location::current(),
56 "DescriptorBuffer not initialized. Call initialize() first.");
64 const std::string& name,
65 const std::shared_ptr<Nodes::Node>& node,
66 const std::string& descriptor_name,
70 error<std::logic_error>(
73 std::source_location::current(),
74 "DescriptorBuffer not initialized. Call initialize() first.");
82 const std::string& name,
83 const std::shared_ptr<Nodes::Node>& node,
84 const std::string& descriptor_name,
88 error<std::logic_error>(
91 std::source_location::current(),
92 "DescriptorBuffer not initialized. Call initialize() first.");
96 m_bindings_processor->bind_structured_node(name, node, descriptor_name, set, binding_config.type);
#define MF_INFO(comp, ctx,...)
std::shared_ptr< DescriptorBindingsProcessor > m_bindings_processor
std::vector< std::string > get_binding_names() const
Get all binding names.
void bind_scalar(const std::string &name, const std::shared_ptr< Nodes::Node > &node, const std::string &descriptor_name, uint32_t set=0)
Bind scalar node output to uniform/SSBO.
ShaderProcessorConfig m_config
DescriptorBuffer(const ShaderProcessorConfig &config, size_t initial_size=4096)
Create descriptor buffer with shader configuration.
void bind_vector(const std::string &name, const std::shared_ptr< Nodes::Node > &node, const std::string &descriptor_name, uint32_t set=0)
Bind vector node output to SSBO.
void unbind(const std::string &name)
Remove a binding.
void bind_matrix(const std::string &name, const std::shared_ptr< Nodes::Node > &node, const std::string &descriptor_name, uint32_t set=0)
Bind matrix node output to SSBO.
void initialize()
Initialize the buffer and its processors.
void bind_structured(const std::string &name, const std::shared_ptr< Nodes::Node > &node, const std::string &descriptor_name, uint32_t set=0)
Bind structured node output to SSBO.
void set_default_processor(std::shared_ptr< Buffers::BufferProcessor > processor) override
Set the buffer's default processor.
vk::DeviceSize get_size_bytes() const
Vulkan-backed buffer wrapper used in processing chains.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Init
Engine/subsystem initialization.
@ Buffers
Buffers, Managers, processors and processing chains.
std::unordered_map< std::string, ShaderBinding > bindings
std::string shader_path
Path to shader file.
Complete configuration for shader processor.