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 37 of file GeometryWriteProcessor.cpp.
38{
39 auto vk = std::dynamic_pointer_cast<VKBuffer>(buffer);
40 if (!vk) {
41 error<std::invalid_argument>(
44 std::source_location::current(),
45 "GeometryWriteProcessor requires a VKBuffer");
46 }
47
48 if (!vk->is_host_visible()) {
50 }
51}
std::shared_ptr< VKBuffer > m_staging
std::shared_ptr< VKBuffer > create_staging_buffer(size_t size)
Create staging buffer for transfers.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Buffers::create_staging_buffer(), and m_staging.