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

◆ decide_vk_buffer()

DistributionDecision MayaFlux::Buffers::BufferTokenDistributor::decide_vk_buffer ( const std::shared_ptr< VKBuffer > &  vk,
ProcessingToken  token 
)
staticprivate

Definition at line 146 of file BufferTokenDistributor.cpp.

149{
150 if (!is_valid_vk_token(token)) {
151 return DistributionDecision {
153 .transfer_processor = nullptr,
154 .transfer_direction = ProcessingToken::AUDIO_BACKEND,
155 .reason = "VKBuffer requires GPU_PPOCESS token without CPU_PROCESS"
156 };
157 }
158
159 // Decision 1: GRAPHICS_BACKEND or FRAME_RATE GPU → DIRECT_ROOT (graphics domain)
161 return DistributionDecision {
163 .transfer_processor = nullptr,
164 .transfer_direction = ProcessingToken::GRAPHICS_BACKEND,
165 .reason = "GPU buffer registered to graphics root"
166 };
167 }
168
169 // Decision 2: AUDIO_PARALLEL (SAMPLE_RATE + GPU) → TRANSFER_ONLY
171 vk->force_internal_usage(true);
172 return DistributionDecision {
174 .transfer_processor = nullptr,
175 .transfer_direction = ProcessingToken::AUDIO_PARALLEL,
176 .reason = "GPU buffer at audio rate marked internal (awaiting transfer)"
177 };
178 }
179
180 return DistributionDecision {
182 .transfer_processor = nullptr,
183 .transfer_direction = ProcessingToken::AUDIO_BACKEND,
184 .reason = "VKBuffer token combination not handled"
185 };
186}
static MayaFlux::Nodes::ProcessingToken token
Definition Timers.cpp:8
static bool has_frame_rate(ProcessingToken token)
static bool is_valid_vk_token(ProcessingToken token)
static bool has_gpu(ProcessingToken token)
static bool has_sample_rate(ProcessingToken token)
@ AUDIO_BACKEND
Standard audio processing backend configuration.
@ GRAPHICS_BACKEND
Standard graphics processing backend configuration.
@ AUDIO_PARALLEL
High-performance audio processing with GPU acceleration.

References MayaFlux::Buffers::AUDIO_BACKEND, MayaFlux::Buffers::AUDIO_PARALLEL, MayaFlux::Buffers::DIRECT_ROOT, MayaFlux::Buffers::GRAPHICS_BACKEND, has_frame_rate(), has_gpu(), has_sample_rate(), is_valid_vk_token(), MayaFlux::Buffers::REJECTED, MayaFlux::Buffers::DistributionDecision::result, token, and MayaFlux::Buffers::TRANSFER_ONLY.

Referenced by distribute().

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