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 |
| BufferView | index_buffer |
| The index buffer binding used by the vertex shader stage. | |
| Range | bound_buffers = Range{0, 0} |
| Range | bound_textures = Range{0, 0} |
| Range | vertex_buffers |
| std::optional< Viewport > | viewport |
| std::optional< IRect32 > | scissor |
| uint64_t | base_vertex = 0u |
| uint32_t | element_count = 0u |
| uint32_t | instance_count = 1u |
| uint32_t | stencil_reference = 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:
BindVerticesCommand 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 156 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 126 of file command.h.
Referenced by impeller::RenderPass::SetBaseVertex(), and impeller::testing::RecordingRenderPass::SetBaseVertex().
An offset into render pass storage where bound buffers/texture metadata is stored.
Definition at line 92 of file command.h.
Referenced by impeller::RenderPass::Draw().
| uint32_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 131 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 88 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 154 of file command.h.
Referenced by impeller::RenderPass::SetIndexBuffer().
| uint32_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 140 of file command.h.
Referenced by impeller::RenderPass::SetInstanceCount(), and impeller::testing::RecordingRenderPass::SetInstanceCount().
| PipelineRef impeller::Command::pipeline |
The pipeline to use for this command.
Definition at line 84 of file command.h.
Referenced by IsValid(), impeller::RenderPass::SetPipeline(), and impeller::testing::RecordingRenderPass::SetPipeline().
| std::optional<IRect32> 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 114 of file command.h.
Referenced by impeller::RenderPass::SetScissor(), and impeller::testing::RecordingRenderPass::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 149 of file command.h.
Referenced by impeller::RenderPass::SetStencilReference(), and impeller::testing::RecordingRenderPass::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 99 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 107 of file command.h.
Referenced by impeller::RenderPass::SetViewport(), and impeller::testing::RecordingRenderPass::SetViewport().