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{
42
44
46 const auto fence = foundry.submit_async(
m_cmd);
48
50 foundry.release_after_submit(std::move(release));
52
55 "GpuDispatchRecorder: failed to submit recorded dispatches");
57 }
58
59 foundry.release_fence(
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.
Portal::Graphics::FenceID m_last
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().