Compute passes encode compute shader into the underlying command buffer.
More...
#include <compute_pass.h>
|
| 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 (std::array< uint32_t, 3 > workgroup_count)=0 |
| | Dispatch a grid of compute workgroups.
|
| |
| 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 Context & | GetContext () const |
| |
| 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, raw_ptr< const Sampler >)=0 |
| |
Compute passes encode compute shader into the underlying command buffer.
- See also
CommandBuffer
Definition at line 25 of file compute_pass.h.
◆ ~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.
const std::shared_ptr< const Context > context_
std::shared_ptr< ContextGLES > context
◆ 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.
◆ 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.
◆ Compute()
| virtual fml::Status impeller::ComputePass::Compute |
( |
std::array< uint32_t, 3 > |
workgroup_count | ) |
|
|
pure virtual |
Dispatch a grid of compute workgroups.
The components of `workgroup_count` are workgroup
(threadgroup) counts, not invocation counts. The number of
invocations per workgroup (the local size) is declared by the
shader. The total invocations along an axis is therefore the
workgroup count times the shader's local size.
- Returns
- A cancelled status if any dimension is zero.
◆ 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.
◆ GetContext()
| const Context & impeller::ComputePass::GetContext |
( |
| ) |
const |
|
inline |
◆ 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 }
19}
virtual void OnSetLabel(const std::string &label)=0
References OnSetLabel().
◆ SetPipeline()
◆ context_
| const std::shared_ptr<const Context> impeller::ComputePass::context_ |
|
protected |
The documentation for this class was generated from the following files: