Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
impeller::ComputePass Class Referenceabstract

Compute passes encode compute shader into the underlying command buffer. More...

#include <compute_pass.h>

Inheritance diagram for impeller::ComputePass:
impeller::ResourceBinder impeller::ComputePassMTL impeller::ComputePassVK

Public Member Functions

virtual ~ComputePass ()
 
virtual bool IsValid () const =0
 
void SetLabel (const std::string &label)
 
virtual void SetCommandLabel (std::string_view label)=0
 
virtual void SetPipeline (const std::shared_ptr< Pipeline< ComputePipelineDescriptor > > &pipeline)=0
 
virtual fml::Status Compute (const ISize &grid_size)=0
 
virtual void AddBufferMemoryBarrier ()=0
 Ensures all previously encoded compute command's buffer writes are visible to any subsequent compute commands.
 
virtual void AddTextureMemoryBarrier ()=0
 Ensures all previously encoded compute command's texture writes are visible to any subsequent compute commands.
 
virtual bool EncodeCommands () const =0
 Encode the recorded commands to the underlying command buffer.
 
const ContextGetContext () const
 
- Public Member Functions inherited from impeller::ResourceBinder
virtual ~ResourceBinder ()=default
 
virtual bool BindResource (ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata &metadata, BufferView view)=0
 
virtual bool BindResource (ShaderStage stage, DescriptorType type, const SampledImageSlot &slot, const ShaderMetadata &metadata, std::shared_ptr< const Texture > texture, const std::unique_ptr< const Sampler > &sampler)=0
 

Protected Member Functions

 ComputePass (std::shared_ptr< const Context > context)
 
virtual void OnSetLabel (const std::string &label)=0
 

Protected Attributes

const std::shared_ptr< const Contextcontext_
 

Detailed Description

Compute passes encode compute shader into the underlying command buffer.

See also
CommandBuffer

Definition at line 23 of file compute_pass.h.

Constructor & Destructor Documentation

◆ ~ComputePass()

impeller::ComputePass::~ComputePass ( )
virtualdefault

◆ ComputePass()

impeller::ComputePass::ComputePass ( std::shared_ptr< const Context context)
explicitprotected

Definition at line 9 of file compute_pass.cc.

10 : context_(std::move(context)) {}
const std::shared_ptr< const Context > context_

Member Function Documentation

◆ AddBufferMemoryBarrier()

virtual void impeller::ComputePass::AddBufferMemoryBarrier ( )
pure virtual

Ensures all previously encoded compute command's buffer writes are visible to any subsequent compute commands.

On Vulkan, it does not matter if the compute command is in a different command buffer, only that it is executed later in queue order.

Implemented in impeller::ComputePassMTL, and impeller::ComputePassVK.

◆ AddTextureMemoryBarrier()

virtual void impeller::ComputePass::AddTextureMemoryBarrier ( )
pure virtual

Ensures all previously encoded compute command's texture writes are visible to any subsequent compute commands.

On Vulkan, it does not matter if the compute command is in a different command buffer, only that it is executed later in queue order.

Implemented in impeller::ComputePassMTL, and impeller::ComputePassVK.

◆ Compute()

virtual fml::Status impeller::ComputePass::Compute ( const ISize grid_size)
pure virtual

◆ EncodeCommands()

virtual bool impeller::ComputePass::EncodeCommands ( ) const
pure virtual

Encode the recorded commands to the underlying command buffer.

Returns
If the commands were encoded to the underlying command buffer.

Implemented in impeller::ComputePassMTL, and impeller::ComputePassVK.

◆ GetContext()

const Context & impeller::ComputePass::GetContext ( ) const
inline

Definition at line 62 of file compute_pass.h.

62{ return *context_; }

◆ IsValid()

virtual bool impeller::ComputePass::IsValid ( ) const
pure virtual

◆ OnSetLabel()

virtual void impeller::ComputePass::OnSetLabel ( const std::string &  label)
protectedpure virtual

◆ SetCommandLabel()

virtual void impeller::ComputePass::SetCommandLabel ( std::string_view  label)
pure virtual

◆ SetLabel()

void impeller::ComputePass::SetLabel ( const std::string &  label)

Definition at line 14 of file compute_pass.cc.

14 {
15 if (label.empty()) {
16 return;
17 }
18 OnSetLabel(label);
19}
virtual void OnSetLabel(const std::string &label)=0

◆ SetPipeline()

virtual void impeller::ComputePass::SetPipeline ( const std::shared_ptr< Pipeline< ComputePipelineDescriptor > > &  pipeline)
pure virtual

Member Data Documentation

◆ context_

const std::shared_ptr<const Context> impeller::ComputePass::context_
protected

Definition at line 65 of file compute_pass.h.


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