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

◆ reset()

void MayaFlux::Yantra::VisionGpuExecutor::reset ( )

Abandon outstanding work and clear the resume point.

Waits on the fence before releasing it, then discards the retained working image and partial result. Call when the pixel source changes so the next run starts a fresh sequence. Safe with nothing outstanding.

Definition at line 332 of file VisionGpuDispatch.cpp.

333{
334 if (!m_contexts)
335 return;
336
337 auto& contexts = *m_contexts;
338
339 reap_fences(contexts);
340
341 if (contexts.suspended.is_active()) {
342 auto& foundry = Portal::Graphics::get_shader_foundry();
343 foundry.wait_for_fence(contexts.suspended.fence);
344 foundry.release_fence(contexts.suspended.fence);
345 contexts.suspended.fence = Portal::Graphics::INVALID_FENCE;
346 contexts.suspended.finalize = nullptr;
347 }
348
349 contexts.flow_state.have_prev = false;
350 contexts.flow_state.curr_ready = false;
351 contexts.flow_state.last_flow.reset();
352 contexts.flow_state.last_tracks.clear();
353 contexts.flow_state.last_track_count = 0;
354 contexts.flow_state.last_export.reset();
355 contexts.flow_state.export_pending = false;
356
357 contexts.pass.sequence = nullptr;
358 contexts.pass.index = 0;
359 contexts.pass.result = Kinesis::Vision::VisionResult {};
360 contexts.pass.current.reset();
361 contexts.pass.forget();
362 contexts.pass.completed.clear();
363
364 contexts.source.reset();
365 contexts.bound_staged.reset();
366}
std::unique_ptr< VisionGpuContexts > m_contexts
constexpr FenceID INVALID_FENCE
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.

References MayaFlux::Portal::Graphics::get_shader_foundry(), and MayaFlux::Portal::Graphics::INVALID_FENCE.

+ Here is the call graph for this function: