14 : context_(
std::move(context)) {}
18 bool CommandBuffer::SubmitCommands(
bool block_on_schedule,
19 const CompletionCallback& callback) {
30 bool CommandBuffer::SubmitCommands(
bool block_on_schedule) {
31 return SubmitCommands(block_on_schedule,
nullptr);
45 if (pass && pass->IsValid()) {
46 pass->SetLabel(
"RenderPass");
54 if (pass && pass->IsValid()) {
55 pass->SetLabel(
"BlitPass");
66 if (pass && pass->IsValid()) {
67 pass->SetLabel(
"ComputePass");
std::shared_ptr< BlitPass > CreateBlitPass()
Create a blit pass to record blit commands into.
virtual void OnWaitUntilCompleted()=0
std::shared_ptr< ComputePass > CreateComputePass()
Create a compute pass to record compute commands into.
CommandBuffer(std::weak_ptr< const Context > context)
virtual bool OnSubmitCommands(bool block_on_schedule, CompletionCallback callback)=0
Submit the command buffer to the GPU for execution.
virtual bool IsValid() const =0
virtual std::shared_ptr< ComputePass > OnCreateComputePass()=0
virtual std::shared_ptr< RenderPass > OnCreateRenderPass(RenderTarget render_target)=0
void WaitUntilCompleted()
Block the current thread until the GPU has completed execution of the commands.
std::shared_ptr< RenderPass > CreateRenderPass(const RenderTarget &render_target)
Create a render pass to record render commands into.
virtual void OnWaitUntilScheduled()=0
virtual std::shared_ptr< BlitPass > OnCreateBlitPass()=0
void WaitUntilScheduled()
Block the current thread until the GPU has completed scheduling execution of the commands.