Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Friends | List of all members
impeller::CommandBufferVK Class Referencefinal

#include <command_buffer_vk.h>

Inheritance diagram for impeller::CommandBufferVK:
impeller::CommandBuffer impeller::BackendCast< CommandBufferVK, CommandBuffer >

Public Member Functions

 ~CommandBufferVK () override
 
const std::shared_ptr< CommandEncoderVK > & GetEncoder ()
 
- Public Member Functions inherited from impeller::CommandBuffer
virtual ~CommandBuffer ()
 
void WaitUntilScheduled ()
 Force execution of pending GPU commands.
 
std::shared_ptr< RenderPassCreateRenderPass (const RenderTarget &render_target)
 Create a render pass to record render commands into.
 
std::shared_ptr< BlitPassCreateBlitPass ()
 Create a blit pass to record blit commands into.
 
std::shared_ptr< ComputePassCreateComputePass ()
 Create a compute pass to record compute commands into.
 

Private Member Functions

void SetLabel (const std::string &label) const override
 
bool IsValid () const override
 
bool OnSubmitCommands (CompletionCallback callback) override
 
void OnWaitUntilScheduled () override
 
std::shared_ptr< RenderPassOnCreateRenderPass (RenderTarget target) override
 
std::shared_ptr< BlitPassOnCreateBlitPass () override
 
std::shared_ptr< ComputePassOnCreateComputePass () override
 

Friends

class ContextVK
 

Additional Inherited Members

- Public Types inherited from impeller::CommandBuffer
enum class  Status { kPending , kError , kCompleted }
 
using CompletionCallback = std::function< void(Status)>
 
- Static Public Member Functions inherited from impeller::BackendCast< CommandBufferVK, CommandBuffer >
static CommandBufferVKCast (CommandBuffer &base)
 
static const CommandBufferVKCast (const CommandBuffer &base)
 
static CommandBufferVKCast (CommandBuffer *base)
 
static const CommandBufferVKCast (const CommandBuffer *base)
 
- Protected Member Functions inherited from impeller::CommandBuffer
 CommandBuffer (std::weak_ptr< const Context > context)
 
- Protected Attributes inherited from impeller::CommandBuffer
std::weak_ptr< const Contextcontext_
 

Detailed Description

Definition at line 18 of file command_buffer_vk.h.

Constructor & Destructor Documentation

◆ ~CommandBufferVK()

impeller::CommandBufferVK::~CommandBufferVK ( )
overridedefault

Member Function Documentation

◆ GetEncoder()

const std::shared_ptr< CommandEncoderVK > & impeller::CommandBufferVK::GetEncoder ( )

Definition at line 45 of file command_buffer_vk.cc.

45 {
46 if (!encoder_) {
47 encoder_ = encoder_factory_->Create();
48 }
49 return encoder_;
50}

◆ IsValid()

bool impeller::CommandBufferVK::IsValid ( ) const
overrideprivatevirtual

Implements impeller::CommandBuffer.

Definition at line 41 of file command_buffer_vk.cc.

41 {
42 return true;
43}

◆ OnCreateBlitPass()

std::shared_ptr< BlitPass > impeller::CommandBufferVK::OnCreateBlitPass ( )
overrideprivatevirtual

Implements impeller::CommandBuffer.

Definition at line 75 of file command_buffer_vk.cc.

75 {
76 if (!IsValid()) {
77 return nullptr;
78 }
79 auto pass = std::shared_ptr<BlitPassVK>(new BlitPassVK(weak_from_this()));
80 if (!pass->IsValid()) {
81 return nullptr;
82 }
83 return pass;
84}
bool IsValid() const override

◆ OnCreateComputePass()

std::shared_ptr< ComputePass > impeller::CommandBufferVK::OnCreateComputePass ( )
overrideprivatevirtual

Implements impeller::CommandBuffer.

Definition at line 86 of file command_buffer_vk.cc.

86 {
87 if (!IsValid()) {
88 return nullptr;
89 }
90 auto context = context_.lock();
91 if (!context) {
92 return nullptr;
93 }
94 auto pass =
95 std::shared_ptr<ComputePassVK>(new ComputePassVK(context, //
96 shared_from_this() //
97 ));
98 if (!pass->IsValid()) {
99 return nullptr;
100 }
101 return pass;
102}
std::weak_ptr< const Context > context_

◆ OnCreateRenderPass()

std::shared_ptr< RenderPass > impeller::CommandBufferVK::OnCreateRenderPass ( RenderTarget  target)
overrideprivatevirtual

Implements impeller::CommandBuffer.

Definition at line 58 of file command_buffer_vk.cc.

59 {
60 auto context = context_.lock();
61 if (!context) {
62 return nullptr;
63 }
64 auto pass =
65 std::shared_ptr<RenderPassVK>(new RenderPassVK(context, //
66 target, //
67 shared_from_this() //
68 ));
69 if (!pass->IsValid()) {
70 return nullptr;
71 }
72 return pass;
73}
uint32_t * target

◆ OnSubmitCommands()

bool impeller::CommandBufferVK::OnSubmitCommands ( CompletionCallback  callback)
overrideprivatevirtual

Implements impeller::CommandBuffer.

Definition at line 52 of file command_buffer_vk.cc.

52 {
54}
#define FML_UNREACHABLE()
Definition logging.h:109

◆ OnWaitUntilScheduled()

void impeller::CommandBufferVK::OnWaitUntilScheduled ( )
overrideprivatevirtual

Implements impeller::CommandBuffer.

Definition at line 56 of file command_buffer_vk.cc.

56{}

◆ SetLabel()

void impeller::CommandBufferVK::SetLabel ( const std::string &  label) const
overrideprivatevirtual

Implements impeller::CommandBuffer.

Definition at line 29 of file command_buffer_vk.cc.

29 {
30 if (!encoder_) {
31 encoder_factory_->SetLabel(label);
32 } else {
33 auto context = context_.lock();
34 if (!context || !encoder_) {
35 return;
36 }
37 ContextVK::Cast(*context).SetDebugName(encoder_->GetCommandBuffer(), label);
38 }
39}
static ContextVK & Cast(Context &base)
bool SetDebugName(T handle, std::string_view label) const
Definition context_vk.h:108

Friends And Related Symbol Documentation

◆ ContextVK

friend class ContextVK
friend

Definition at line 29 of file command_buffer_vk.h.


The documentation for this class was generated from the following files: