Class: PipelineSystem
Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.d.ts:29
A system that creates and manages the GPU pipelines.
Caching Mechanism: At its core, the system employs a two-tiered caching strategy to minimize the redundant creation of GPU pipelines (or "pipes"). This strategy is based on generating unique keys that represent the state of the graphics settings and the specific requirements of the item being rendered. By caching these pipelines, subsequent draw calls with identical configurations can reuse existing pipelines instead of generating new ones.
State Management: The system differentiates between "global" state properties (like color masks and stencil masks, which do not change frequently) and properties that may vary between draw calls (such as geometry, shaders, and blend modes). Unique keys are generated for both these categories using getStateKey for global state and getGraphicsStateKey for draw-specific settings. These keys are then then used to caching the pipe. The next time we need a pipe we can check the cache by first looking at the state cache and then the pipe cache.
Advanced
Implements
Constructors
Constructor
> new PipelineSystem(renderer): PipelineSystem
Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.d.ts:49
Parameters
renderer
Returns
PipelineSystem
Properties
CONTEXT_UID
> protected CONTEXT_UID: number
Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.d.ts:36
Methods
contextChange()
> protected contextChange(gpu): void
Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.d.ts:50
Parameters
gpu
Returns
void
destroy()
> destroy(): void
Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.d.ts:72
Generic destroy methods to be overridden by the subclass
Returns
void
Implementation of
getBufferNamesToBind()
> getBufferNamesToBind(geometry, program): Record<string, string>
Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.d.ts:69
Returns a hash of buffer names mapped to bind locations. This is used to bind the correct buffer to the correct location in the shader.
Parameters
geometry
The geometry where to get the buffer names
program
The program where to get the buffer names
Returns
Record<string, string>
An object of buffer names mapped to the bind location.
getPipeline()
> getPipeline(geometry, program, state, topology?): GPURenderPipeline
Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.d.ts:56
Parameters
geometry
program
state
topology?
Returns
GPURenderPipeline
setColorMask()
> setColorMask(colorMask): void
Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.d.ts:53
Parameters
colorMask
number
Returns
void
setMultisampleCount()
> setMultisampleCount(multisampleCount): void
Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.d.ts:51
Parameters
multisampleCount
number
Returns
void
setPipeline()
> setPipeline(geometry, program, state, passEncoder): void
Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.d.ts:55
Parameters
geometry
program
state
passEncoder
GPURenderPassEncoder
Returns
void
setRenderTarget()
> setRenderTarget(renderTarget): void
Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.d.ts:52
Parameters
renderTarget
GpuRenderTarget
Returns
void
setStencilMode()
> setStencilMode(stencilMode): void
Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/pipeline/PipelineSystem.d.ts:54
Parameters
stencilMode
Returns
void