19 size_t capacity_bytes,
22 Kakshya::DataModality::VERTEX_POSITIONS_3D)
35 auto proc = std::make_shared<Buffers::FormaProcessor>(
m_topology);
41 chain = std::make_shared<Buffers::BufferProcessingChain>();
44 chain->set_preferred_token(token);
52 m_processor->set_texture(std::move(img), std::move(binding));
64 const bool multi_tex = multi_count > 0;
74 }
else if (single_tex) {
94#ifdef MAYAFLUX_PLATFORM_MACOS
109 resolved.
vertex_shader = multi_tex ?
"triangle_multi.vert.spv" :
"triangle.vert.spv";
113 }
else if (single_tex) {
131 const uint32_t
total = single_tex ? 1 + multi_count : multi_count;
133 0, 1, vk::DescriptorType::eCombinedImageSampler,
total);
134 }
else if (single_tex) {
136 0, 1, vk::DescriptorType::eCombinedImageSampler);
146 [&](
const auto& p) { return p.first == config.default_texture_binding; });
172 "FormaBuffer::submit called before setup_processors, storing {} bytes for later submission", bytes.size());
179 const std::vector<uint8_t>& bytes,
180 std::optional<Portal::Graphics::PrimitiveTopology>
topology)
184 "FormaBuffer::add_slice called before setup_processors");
203 return m_processor && m_processor->has_slice(
id);
235 "FormaBuffer::set_texture called before setup_processors, storing texture for later submission");
#define MF_ERROR(comp, ctx,...)
#define MF_RT_TRACE(comp, ctx,...)
BufferProcessingChain * chain
PrimitiveTopology topology
std::shared_ptr< Buffers::BufferProcessingChain > get_processing_chain() override
Access the buffer's processing chain.
void set_default_processor(const std::shared_ptr< BufferProcessor > &processor) override
Set the buffer's default processor.
void set_processing_chain(const std::shared_ptr< BufferProcessingChain > &chain, bool force=false) override
Replace the buffer's processing chain.
void apply_render_config(const RenderConfig &config, const ShaderConfig &shader_config)
Configure the internal m_render_processor from a RenderConfig.
std::shared_ptr< RenderProcessor > m_render_processor
void set_default_render_config(const RenderConfig &config)
Called by derived classes to set their context-specific defaults.
Vulkan-backed buffer wrapper used in processing chains.
ProcessingToken
Bitfield enum defining processing characteristics and backend requirements for buffer operations.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
BufferUsageHint
Semantic usage hint for buffer allocation and memory properties.
PrimitiveTopology
Vertex assembly primitive topology.
Describes how a VKBuffer binds to a shader descriptor.
std::vector< std::pair< std::string, std::shared_ptr< Core::VKImage > > > additional_textures
bool triangulate
Reduce supplied spans to triangles before drawing them.
PrimitiveTopology topology
std::string vertex_shader
std::string fragment_shader
std::string default_texture_binding
std::string geometry_shader
Unified rendering configuration for graphics buffers.