The core processing function that must be implemented by derived classes.
- Parameters
-
This method is where the actual transformation logic is implemented. It should contain the algorithmic details of how the buffer's data is transformed, analyzed, or processed. The implementation can utilize any backend capabilities available to the processor, including:
- Parallel Processing: Using multi-threading or GPU compute for large datasets
- Data Transformations: Applying mathematical operations, filters, or effects
- Feature Extraction: Analyzing data characteristics for further processing
Derived classes must override this method to provide specific processing behavior.
Implements MayaFlux::Buffers::BufferProcessor.
Reimplemented in MayaFlux::Buffers::VolumeFieldProcessor, and MayaFlux::Buffers::VolumeSurfaceProcessor.
Definition at line 36 of file ShaderProcessor.cpp.
37{
38 auto vk_buffer = std::dynamic_pointer_cast<VKBuffer>(buffer);
39 if (!vk_buffer) {
41 "ShaderProcessor can only process VKBuffers");
42 return;
43 }
44
47 }
48
52 return;
53 }
54 }
55
58 "on_before_execute() reported failure, skipping shader execution");
59 return;
60 }
61
67 }
68
73 }
74
78 } else {
80 }
81
84}
#define MF_ERROR(comp, ctx,...)
#define MF_RT_DEBUG(comp, ctx,...)
virtual void initialize_pipeline(const std::shared_ptr< VKBuffer > &buffer)=0
void pump_feeds()
Pull every feed and write its result.
Portal::Graphics::CommandBufferID m_last_command_buffer
virtual void execute_shader(const std::shared_ptr< VKBuffer > &buffer)=0
virtual void on_after_execute(Portal::Graphics::CommandBufferID cmd_id, const std::shared_ptr< VKBuffer > &buffer)
Called after each process callback.
virtual void initialize_descriptors(const std::shared_ptr< VKBuffer > &buffer)=0
bool m_needs_descriptor_rebuild
virtual void update_descriptors(const std::shared_ptr< VKBuffer > &buffer)
virtual bool on_before_execute(Portal::Graphics::CommandBufferID cmd_id, const std::shared_ptr< VKBuffer > &buffer)
Called before each process callback.
bool m_deferred_submission
False submits synchronously, preserving pre-existing behaviour.
bool resolve_pending_dispatch(bool block)
Resolve an outstanding asynchronous submission.
bool is_dispatch_pending() const
True while an asynchronous submission is outstanding.
std::unordered_map< std::string, Feed > m_feeds
bool m_needs_pipeline_rebuild
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, execute_shader(), initialize_descriptors(), initialize_pipeline(), initialize_shader(), is_dispatch_pending(), m_deferred_submission, m_feeds, m_initialized, m_last_command_buffer, m_needs_descriptor_rebuild, m_needs_pipeline_rebuild, MF_ERROR, MF_RT_DEBUG, on_after_execute(), on_before_execute(), pump_feeds(), resolve_pending_dispatch(), and update_descriptors().