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 65 of file ShaderProcessor.cpp.
66{
67 auto vk_buffer = std::dynamic_pointer_cast<VKBuffer>(buffer);
68 if (!vk_buffer)
69 return;
70
73 }
74
76 "ShaderProcessor attached to VKBuffer (size: {} bytes, modality: {})",
77 vk_buffer->get_size_bytes(),
78 static_cast<int>(vk_buffer->get_modality()));
79}
#define MF_DEBUG(comp, ctx,...)
void auto_bind_buffer(const std::shared_ptr< VKBuffer > &buffer)
Auto-bind buffer based on attachment order.
ShaderProcessorConfig m_config
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
std::unordered_map< std::string, ShaderBinding > bindings
References auto_bind_buffer(), MayaFlux::Buffers::ShaderProcessorConfig::bindings, MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, m_config, and MF_DEBUG.
Referenced by MayaFlux::Buffers::RenderProcessor::on_attach().