The core processing function that must be implemented by derived classes.
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:
Derived classes must override this method to provide specific processing behavior.
24{
25 auto vk_buffer = std::dynamic_pointer_cast<VKBuffer>(buffer);
26 if (!vk_buffer) {
28 "BufferUploadProcessor requires VKBuffer");
29 return;
30 }
31
32 if (!vk_buffer->is_initialized()) {
34 "VKBuffer not initialized - register with BufferManager first");
35 return;
36 }
37
40 return;
41 }
42
44 if (source_it ==
m_source_map.end() || !source_it->second) {
46 "BufferUploadProcessor has no source configured for this buffer");
47 return;
48 }
49
50 auto source = source_it->second;
51 auto source_data = std::dynamic_pointer_cast<VKBuffer>(source)->get_data();
52 if (source_data.empty()) {
54 "Source buffer has no data to upload");
55 return;
56 }
57
58 if (vk_buffer->is_host_visible()) {
60 } else {
62 }
63}
#define MF_RT_WARN(comp, ctx,...)
#define MF_RT_ERROR(comp, ctx,...)
std::unordered_map< std::shared_ptr< Buffer >, std::shared_ptr< Buffer > > m_source_map
Maps target VKBuffer -> source Buffer.
void upload_back_buffers(const std::shared_ptr< VKBuffer > &target)
std::unordered_map< std::shared_ptr< Buffer >, std::vector< std::shared_ptr< Buffer > > > m_back_buffers_source_map
Maps target VKBuffer -> vector of source Buffers for back_buffers.
void upload_device_local(const std::shared_ptr< VKBuffer > &target, const Kakshya::DataVariant &data)
void upload_host_visible(const std::shared_ptr< VKBuffer > &target, const Kakshya::DataVariant &data, size_t dst_offset)
Upload data to a host-visible buffer.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.