An object used to specify work to the GPU along with references to resources the GPU will used when doing said work. More...
#include <command.h>
Public Member Functions | |
bool | IsValid () const |
Public Attributes | |
PipelineRef | pipeline |
Range | bound_buffers = Range{0, 0} |
Range | bound_textures = Range{0, 0} |
uint32_t | stencil_reference = 0u |
uint64_t | base_vertex = 0u |
std::optional< Viewport > | viewport |
std::optional< IRect > | scissor |
size_t | instance_count = 1u |
Range | vertex_buffers |
BufferView | index_buffer |
The index buffer binding used by the vertex shader stage. More... | |
size_t | element_count = 0u |
IndexType | index_type = IndexType::kUnknown |
An object used to specify work to the GPU along with references to resources the GPU will used when doing said work.
To construct a valid command, follow these steps:
BindVertices
Command can be created frequently and on demand. The resources referenced in commands views into buffers managed by other allocators and resource managers.
|
inline |
Definition at line 151 of file command.h.
References impeller::Pipeline< T >::IsValid(), and pipeline.
uint64_t impeller::Command::base_vertex = 0u |
The offset used when indexing into the vertex buffer.
Definition at line 108 of file command.h.
Referenced by impeller::RenderPass::SetBaseVertex().
An offset into render pass storage where bound buffers/texture metadata is stored.
Definition at line 87 of file command.h.
Referenced by impeller::RenderPass::Draw().
Definition at line 88 of file command.h.
Referenced by impeller::RenderPass::Draw().
size_t impeller::Command::element_count = 0u |
The number of elements to draw. When only a vertex buffer is set, this is the vertex count. When an index buffer is set, this is the index count.
Definition at line 144 of file command.h.
Referenced by impeller::RenderPass::SetElementCount().
BufferView impeller::Command::index_buffer |
The index buffer binding used by the vertex shader stage.
Definition at line 139 of file command.h.
Referenced by impeller::RenderPass::SetIndexBuffer().
IndexType impeller::Command::index_type = IndexType::kUnknown |
The type of indices in the index buffer. The indices must be tightly packed in the index buffer.
Definition at line 149 of file command.h.
Referenced by impeller::RenderPass::SetIndexBuffer().
size_t impeller::Command::instance_count = 1u |
The number of instances of the given set of vertices to render. Not all backends support rendering more than one instance at a time.
Definition at line 129 of file command.h.
Referenced by impeller::RenderPass::SetInstanceCount().
PipelineRef impeller::Command::pipeline |
The pipeline to use for this command.
Definition at line 83 of file command.h.
Referenced by IsValid(), and impeller::RenderPass::SetPipeline().
std::optional<IRect> impeller::Command::scissor |
The scissor rect to use for clipping writes to the render target. The scissor rect must lie entirely within the render target. If unset, no scissor is applied.
Definition at line 121 of file command.h.
Referenced by impeller::RenderPass::SetScissor().
uint32_t impeller::Command::stencil_reference = 0u |
The reference value to use in stenciling operations. Stencil configuration is part of pipeline setup and can be read from the pipelines descriptor.
Pipeline
PipelineDescriptor
Definition at line 104 of file command.h.
Referenced by impeller::RenderPass::SetStencilReference().
Range impeller::Command::vertex_buffers |
An offset and range of vertex buffers bound for this draw call.
The vertex buffers are stored on the render pass object.
Definition at line 135 of file command.h.
Referenced by impeller::RenderPass::Draw(), and impeller::RenderPass::SetVertexBuffer().
std::optional<Viewport> impeller::Command::viewport |
The viewport coordinates that the rasterizer linearly maps normalized device coordinates to. If unset, the viewport is the size of the render target with a zero origin, znear=0, and zfar=1.
Definition at line 115 of file command.h.
Referenced by impeller::RenderPass::SetViewport().