14 : context_(
std::move(context)) {}
18 bool CommandBuffer::SubmitCommands(
const CompletionCallback& callback) {
29 bool CommandBuffer::SubmitCommands() {
30 return SubmitCommands(
nullptr);
44 if (pass && pass->IsValid()) {
45 pass->SetLabel(
"RenderPass");
53 if (pass && pass->IsValid()) {
54 pass->SetLabel(
"BlitPass");
65 if (pass && pass->IsValid()) {
66 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 IsValid() const =0
virtual std::shared_ptr< ComputePass > OnCreateComputePass()=0
virtual bool OnSubmitCommands(CompletionCallback callback)=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.