Called when this processor is attached to a buffer.
- Parameters
-
| buffer | Buffer this processor is being attached to |
Provides an opportunity for the processor to initialize buffer-specific state, allocate resources, or perform validation. With expanded processor capabilities, this method can also:
- Analyze Buffer Characteristics: Examine data type, size, and format requirements
- Select Optimal Backend: Choose the most appropriate processing backend for the buffer
- Initialize Hardware Resources: Set up GPU contexts, CUDA streams, or other acceleration
- Configure Processing Parameters: Adapt algorithm parameters to buffer characteristics
- Establish Processing Strategy: Determine whether to use sequential or parallel execution
- Validate Compatibility: Ensure the processor can handle the buffer's data type and format
Default implementation does nothing, but derived classes should override this method to leverage the full capabilities of the expanded processor architecture.
Reimplemented from MayaFlux::Buffers::BufferProcessor.
Definition at line 24 of file MeshNetworkProcessor.cpp.
25{
28 "MeshNetworkProcessor attached to empty network");
29 return;
30 }
31
32 auto vk_buf = std::dynamic_pointer_cast<VKBuffer>(buffer);
33 if (!vk_buf) {
35 "MeshNetworkProcessor: attached buffer is not a VKBuffer");
36 return;
37 }
38
40
42
47
49 "MeshNetworkProcessor: initialised — {} slots, {} bytes vertex, {} indices",
53}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
std::vector< uint8_t > m_vertex_aggregate
Aggregate scratch buffers reused each cycle to avoid allocation.
void link_index_resources(const std::shared_ptr< VKBuffer > &vertex_buf)
void upload_combined(const std::shared_ptr< VKBuffer > &vertex_buf)
void clear_slot_dirty_flags()
std::vector< uint32_t > m_index_aggregate
void allocate_gpu_buffers(const std::shared_ptr< VKBuffer > &vertex_buf)
std::shared_ptr< Nodes::Network::MeshNetwork > m_network
void ensure_initialized(const std::shared_ptr< VKBuffer > &buffer)
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
References allocate_gpu_buffers(), MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, clear_slot_dirty_flags(), MayaFlux::Buffers::VKBufferProcessor::ensure_initialized(), link_index_resources(), m_index_aggregate, m_network, m_vertex_aggregate, MF_ERROR, MF_INFO, MF_WARN, and upload_combined().