10 #include "fml/logging.h"
21 CommandBufferVK::CommandBufferVK(
22 std::weak_ptr<const Context> context,
23 std::shared_ptr<CommandEncoderFactoryVK> encoder_factory)
24 : CommandBuffer(
std::move(context)),
25 encoder_factory_(
std::move(encoder_factory)) {}
29 void CommandBufferVK::SetLabel(
const std::string& label)
const {
31 encoder_factory_->SetLabel(label);
34 if (!context || !encoder_) {
41 bool CommandBufferVK::IsValid()
const {
47 encoder_ = encoder_factory_->Create();
52 bool CommandBufferVK::OnSubmitCommands(CompletionCallback callback) {
56 void CommandBufferVK::OnWaitUntilScheduled() {}
58 std::shared_ptr<RenderPass> CommandBufferVK::OnCreateRenderPass(
59 RenderTarget target) {
65 std::shared_ptr<RenderPassVK>(
new RenderPassVK(context,
69 if (!pass->IsValid()) {
75 std::shared_ptr<BlitPass> CommandBufferVK::OnCreateBlitPass() {
79 auto pass = std::shared_ptr<BlitPassVK>(
new BlitPassVK(weak_from_this()));
80 if (!pass->IsValid()) {
86 std::shared_ptr<ComputePass> CommandBufferVK::OnCreateComputePass() {
95 std::shared_ptr<ComputePassVK>(
new ComputePassVK(context,
98 if (!pass->IsValid()) {