Skip to content

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.

ArgumentTypeRequiredDescription
bindGroupvtkWebGPUBindGroupYes

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.

ArgumentTypeRequiredDescription
baseSettingsIWebGPUPipelineSettingsYes
extraSettingsIWebGPUPipelineSettingsYes

bindVertexInput ​

Bind the buffers of a vertex input onto a render encoder.

ArgumentTypeRequiredDescription
renderEncodervtkWebGPURenderEncoderYes
vInputvtkWebGPUVertexInputYes

extend ​

Method used to decorate a given object (publicAPI+model) with vtkWebGPUPipeline characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIWebGPUPipelineInitialValuesNo(default: {})

getBindGroupLayout ​

Get the bind group layout at an index.

ArgumentTypeRequiredDescription
idxNumberYes

getBindGroupLayoutIndex ​

Get the index of the bind group layout registered under a label, or -1 when there is none.

ArgumentTypeRequiredDescription
llabelStringYes

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.

ArgumentTypeRequiredDescription
stypeWebGPUShaderTypeYes

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.

ArgumentTypeRequiredDescription
devicevtkWebGPUDeviceYes
hashStringYesthe label given to the pipeline

newInstance ​

Method used to create a new instance of vtkWebGPUPipeline.

ArgumentTypeRequiredDescription
initialValuesIWebGPUPipelineInitialValuesNofor pre-setting some of its content

setDevice ​

Set the device this pipeline is created on.

ArgumentTypeRequiredDescription
devicevtkWebGPUDeviceYes

setExtraPipelineSettings ​

Set the settings merged on top of the render encoder settings.

ArgumentTypeRequiredDescription
extraPipelineSettingsIWebGPUPipelineSettingsYes

setRenderEncoder ​

Set the render encoder providing the base pipeline settings.

ArgumentTypeRequiredDescription
renderEncodervtkWebGPURenderEncoderYes

setTopology ​

Set the primitive topology this pipeline draws.

ArgumentTypeRequiredDescription
topologyGPUPrimitiveTopologyYes

setVertexState ​

Set the vertex state, i.e. the buffer layouts, of this pipeline.

ArgumentTypeRequiredDescription
vertexStateGPUVertexStateYes