Caches a compiled render pipeline for the Slug fill shader, plus its bind group layout. More...
#include "donner/svg/renderer/geode/GeodePipeline.h"
Public Member Functions | |
| GeodePipeline (gpu::Device &device, gpu::TextureFormat colorFormat) | |
| Create a Slug fill pipeline for the given device and color target format. | |
| GeodePipeline (const GeodePipeline &)=delete | |
| GeodePipeline & | operator= (const GeodePipeline &)=delete |
| GeodePipeline (GeodePipeline &&) noexcept=default | |
| Move constructor. | |
| GeodePipeline & | operator= (GeodePipeline &&) noexcept=default |
| Move assignment operator. | |
| const gpu::RenderPipeline & | pipeline () const |
| The compiled render pipeline. Its entry points take the draw's paint and geometry parameters from the uniform, which serves every draw whose instances share one paint and one encoded path. | |
| const gpu::RenderPipeline & | batchedPipeline () const |
| The cross-entity batch variant of pipeline: same layout, same shader module and same blending, but the entry points that take paint and geometry from each instance's record. | |
| const gpu::BindGroupLayout & | bindGroupLayout () const |
| The bind group layout used by both pipelines. | |
| gpu::TextureFormat | colorFormat () const |
| Color format the pipeline was built for. | |
Caches a compiled render pipeline for the Slug fill shader, plus its bind group layout.
One GeodePipeline instance is sufficient per (device, render-target-format) pair - the actual data (uniforms, bands, curves) varies per draw call but the pipeline state object can be reused.
The pipeline is created through the donner::gpu runtime, which owns it through RAII
Resource bindings and stage visibility come from the compiled Slug interface.
The pipeline has no vertex buffer. Its shader expands the uniform bounding polygon into a triangle fan from vertex_index and applies the half-pixel AA halo in device space.
| donner::geode::GeodePipeline::GeodePipeline | ( | gpu::Device & | device, |
| gpu::TextureFormat | colorFormat ) |
Create a Slug fill pipeline for the given device and color target format.
| device | Runtime device the pipeline and its layouts are created on. |
| colorFormat | The pixel format of the render target this pipeline will draw into. Must match the target texture's format at draw time. |
| const gpu::RenderPipeline & donner::geode::GeodePipeline::batchedPipeline | ( | ) | const |
The cross-entity batch variant of pipeline: same layout, same shader module and same blending, but the entry points that take paint and geometry from each instance's record.
Compiled on first call, because only a cross-entity batch needs it.