> ## Documentation Index
> Fetch the complete documentation index at: https://rive.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# GPUPipeline

A compiled GPU render pipeline (shaders + fixed-function state).

## Constructors

### `new`

<div class="signature">
  ```lua theme={null}
  new(desc: {vertex: PipelineStage, fragment: PipelineStage?, vertexLayout:{VertexBufferLayout}, bindGroupLayouts:{GPUBindGroupLayout}?, colorTargets:{ColorTarget}?, depthStencil: DepthStencilState?, cullMode: CullMode?, topology: PrimitiveTopology?, sampleCount: number?,}) -> GPUPipeline
  ```
</div>

## Methods

### `getBindGroupLayout`

<div class="signature">
  ```lua theme={null}
  getBindGroupLayout(groupIndex: number) -> GPUBindGroupLayout
  ```
</div>

Returns the layout the pipeline auto-derived for `@group(N)`.
Errors if `bindGroupLayouts` was supplied at construction (reuse
the explicit one) or if N is not bound by the shader. Mirrors
WebGPU's `pipeline.getBindGroupLayout(index)`.
