Pipeline
Introduction
A GPU render pipeline, built from the settings of a render encoder, the bind group layouts of its bindables and the shader modules of its stages.
Methods
addBindGroupLayout
Append the layout of a bind group to the pipeline layout. Does nothing when the bind group is falsy.
| Argument | Type | Required | Description |
|---|---|---|---|
bindGroup | vtkWebGPUBindGroup | Yes |
applyPipelineSettings
Merge extra pipeline settings onto base settings, merging the primitive, depthStencil and fragment states one level deep. Returns the base settings unchanged when there are no extra settings.
| Argument | Type | Required | Description |
|---|---|---|---|
baseSettings | IWebGPUPipelineSettings | Yes | |
extraSettings | IWebGPUPipelineSettings | Yes |
bindVertexInput
Bind the buffers of a vertex input onto a render encoder.
| Argument | Type | Required | Description |
|---|---|---|---|
renderEncoder | vtkWebGPURenderEncoder | Yes | |
vInput | vtkWebGPUVertexInput | Yes |
extend
Method used to decorate a given object (publicAPI+model) with vtkWebGPUPipeline characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IWebGPUPipelineInitialValues | No | (default: {}) |
getBindGroupLayout
Get the bind group layout at an index.
| Argument | Type | Required | Description |
|---|---|---|---|
idx | Number | Yes |
getBindGroupLayoutIndex
Get the index of the bind group layout registered under a label, or -1 when there is none.
| Argument | Type | Required | Description |
|---|---|---|---|
llabel | String | Yes |
getDevice
Get the device this pipeline is created on.
getExtraPipelineSettings
Get the settings merged on top of the render encoder settings.
getHandle
Get the underlying GPU render pipeline.
getPipelineDescription
Get the description the GPU render pipeline was created from.
getRenderEncoder
Get the render encoder providing the base pipeline settings.
getShaderDescription
Get the shader description of a stage, or null when this pipeline has none for it.
| Argument | Type | Required | Description |
|---|---|---|---|
stype | WebGPUShaderType | Yes |
getShaderDescriptions
Get the shader descriptions of every stage of this pipeline.
getTopology
Get the primitive topology this pipeline draws.
getVertexState
Get the vertex state, i.e. the buffer layouts, of this pipeline.
initialize
Create the GPU render pipeline from the render encoder settings, the bind group layouts and the shader descriptions added so far.
| Argument | Type | Required | Description |
|---|---|---|---|
device | vtkWebGPUDevice | Yes | |
hash | String | Yes | the label given to the pipeline |
newInstance
Method used to create a new instance of vtkWebGPUPipeline.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IWebGPUPipelineInitialValues | No | for pre-setting some of its content |
setDevice
Set the device this pipeline is created on.
| Argument | Type | Required | Description |
|---|---|---|---|
device | vtkWebGPUDevice | Yes |
setExtraPipelineSettings
Set the settings merged on top of the render encoder settings.
| Argument | Type | Required | Description |
|---|---|---|---|
extraPipelineSettings | IWebGPUPipelineSettings | Yes |
setRenderEncoder
Set the render encoder providing the base pipeline settings.
| Argument | Type | Required | Description |
|---|---|---|---|
renderEncoder | vtkWebGPURenderEncoder | Yes |
setTopology
Set the primitive topology this pipeline draws.
| Argument | Type | Required | Description |
|---|---|---|---|
topology | GPUPrimitiveTopology | Yes |
setVertexState
Set the vertex state, i.e. the buffer layouts, of this pipeline.
| Argument | Type | Required | Description |
|---|---|---|---|
vertexState | GPUVertexState | Yes |