MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ is_compatible_with()

bool MayaFlux::Buffers::DataReadProcessor::is_compatible_with ( const std::shared_ptr< Buffer > &  ) const
overridevirtual

Checks if this processor can handle the specified buffer type.

Parameters
bufferBuffer to check compatibility with
Returns
True if the processor can process this buffer type, false otherwise

This method enables dynamic processor validation and selection based on buffer characteristics. Processors can examine the buffer's data type, format, size, and other properties to determine compatibility, enabling robust error handling and automatic processor selection in complex processing pipelines.

Reimplemented from MayaFlux::Buffers::BufferProcessor.

Definition at line 378 of file DataReadProcessor.cpp.

379{
380 const auto vk_buffer = std::dynamic_pointer_cast<VKBuffer>(buffer);
381 if (!vk_buffer) {
382 return false;
383 }
384
385 if (std::dynamic_pointer_cast<MeshBuffer>(buffer)
386 || std::dynamic_pointer_cast<MeshNetworkBuffer>(buffer)
387 || std::dynamic_pointer_cast<GeometryBuffer>(buffer)
388 || std::dynamic_pointer_cast<NodeTextureBuffer>(buffer)) {
389 return true;
390 }
391
392 return vk_buffer->is_host_visible() || is_transfer_source(vk_buffer);
393}
std::shared_ptr< NetworkGeometryBuffer > buffer
bool is_transfer_source(const std::shared_ptr< VKBuffer > &buffer)
Whether a buffer's memory can be the source of a transfer.

References buffer, and MayaFlux::Buffers::is_transfer_source().

Referenced by on_attach(), and processing_function().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: