Skip to content

Device ​

Methods ​

afterNextSubmit ​

Run a callback after the next command encoder is submitted. Resources released there remain valid for commands recorded before the submission.

createCommandEncoder ​

Create a new command encoder on the underlying device.

createPipeline ​

Initialize the given pipeline and store it under the given hash.

ArgumentTypeRequiredDescription
hashYesThe pipeline hash.
pipelineYesThe vtkWebGPUPipeline to initialize.

deleteValue ​

Remove every entry whose weak reference resolves to the given value.

extend ​

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

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

getBindGroupLayout ​

Get a bind group layout matching the given description, creating and caching it when it is not already known. Missing binding and visibility entries are filled in with defaults.

ArgumentTypeRequiredDescription
valYesThe bind group layout descriptor.

getBindGroupLayoutDescription ​

Get the stringified descriptor a cached bind group layout was built from.

ArgumentTypeRequiredDescription
layoutYesA layout previously returned by getBindGroupLayout.

getBufferManager ​

Get the buffer manager owned by this device.

getGeneration ​

Get the generation of the currently initialized device handle.

getHandle ​

Get the GPUDevice this object wraps.

getPipeline ​

Get a previously created pipeline by hash.

ArgumentTypeRequiredDescription
hashYesThe pipeline hash.

getShaderCache ​

Get the shader cache owned by this device.

getShaderModule ​

Get a shader module from the shader cache for the given shader description.

ArgumentTypeRequiredDescription
sdYesThe vtkWebGPUShaderDescription to compile.

getTextureManager ​

Get the texture manager owned by this device.

getValue ​

Dereference the entry stored under the given key.

hasCachedObject ​

Get the cached object stored under the given hash, if it is still alive.

ArgumentTypeRequiredDescription
hashYesThe object hash.

hasFeature ​

Whether the wrapped device exposes the feature.

initialize ​

Set the GPUDevice this object wraps.

ArgumentTypeRequiredDescription
handleYesThe WebGPU device.

newInstance ​

Method used to create a new instance of vtkWebGPUDevice.

ArgumentTypeRequiredDescription
initialValuesIWebGPUDeviceInitialValuesNofor pre-setting some of its content

onSubmittedWorkDone ​

Resolves once all work submitted to the device queue has completed.

removeCachedObject ​

Remove every cache entry referring to this object.

setHandle ​

Set the GPUDevice this object wraps.

setValue ​

Store a weak reference to the given value. Non objects are not stored.

submitCommandEncoder ​

Finish the given command encoder and submit it to the device queue.

ArgumentTypeRequiredDescription
commandEncoderYesThe encoder to finish and submit.