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

◆ submit()

Portal::Graphics::FenceID MayaFlux::Yantra::GpuDispatchRecorder::submit ( )

Submit what has been recorded, without waiting.

Ends the recording with a barrier that orders later commands and host reads behind its writes. Does nothing when nothing is recorded.

Returns
The fence of the most recent submission, owned by the recorder: poll it with is_complete(), never release it. INVALID_FENCE when nothing is outstanding.

Definition at line 38 of file GpuResourceManager.cpp.

39{
40 if (!is_open())
41 return m_last;
42
44
46 const auto fence = foundry.submit_async(m_cmd);
48
49 for (auto& release : m_releases)
50 foundry.release_after_submit(std::move(release));
51 m_releases.clear();
52
55 "GpuDispatchRecorder: failed to submit recorded dispatches");
56 return m_last;
57 }
58
59 foundry.release_fence(m_last);
60 m_last = fence;
61 return m_last;
62}
#define MF_ERROR(comp, ctx,...)
Portal::Graphics::CommandBufferID m_cmd
static void record_closing_barrier(Portal::Graphics::CommandBufferID cmd_id)
Record the barrier every submission of Yantra dispatch work ends with.
std::vector< std::function< void()> > m_releases
bool is_open() const
True while commands are recorded and not yet submitted.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains).
@ Yantra
DSP algorithms, computational units, matrix operations, Grammar.
constexpr FenceID INVALID_FENCE
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.
constexpr CommandBufferID INVALID_COMMAND_BUFFER

References MayaFlux::Journal::BufferProcessing, MayaFlux::Portal::Graphics::get_shader_foundry(), MayaFlux::Portal::Graphics::INVALID_COMMAND_BUFFER, MayaFlux::Portal::Graphics::INVALID_FENCE, is_open(), m_cmd, m_last, m_releases, MF_ERROR, record_closing_barrier(), and MayaFlux::Journal::Yantra.

Referenced by MayaFlux::Yantra::VisionExtractor::annotate(), and wait().

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