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 130 of file NodeTextureProcessor.cpp.
131{
134 return;
135 }
136
140 }
141
143 error<std::runtime_error>(
146 std::source_location::current(),
147 "TextureProcessor requires a valid buffer service");
148 }
149
151 try {
153 } catch (const std::exception& e) {
157 std::source_location::current(),
158 "Failed to initialize texture buffer: {}", e.what());
159 }
160 }
161
163}
std::shared_ptr< NodeTextureBuffer > m_attached_buffer
void initialize_gpu_resources()
Registry::Service::BufferService * m_buffer_service
Interface * get_service()
Query for a backend service.
static BackendRegistry & instance()
Get the global registry instance.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
void error_rethrow(Component component, Context context, std::source_location location=std::source_location::current(), std::string_view additional_context="")
Catch and log an exception, then rethrow it.
@ Buffers
Buffers, Managers, processors and processing chains.
std::function< void(const std::shared_ptr< void > &)> initialize_buffer
Initialize a buffer object.
References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Registry::BackendRegistry::get_service(), MayaFlux::Registry::Service::BufferService::initialize_buffer, initialize_gpu_resources(), MayaFlux::Registry::BackendRegistry::instance(), m_attached_buffer, and MayaFlux::Buffers::VKBufferProcessor::m_buffer_service.