4#ifndef vtkWebGPUComputePipeline_h
5#define vtkWebGPUComputePipeline_h
12#include <unordered_map>
14VTK_ABI_NAMESPACE_BEGIN
46 vtkGetMacro(Label, std::string&);
47 vtkSetMacro(Label, std::string);
118 bool GetRegisteredBuffer(
121 bool GetRegisteredTexture(
129 void EnsureConfigured();
140 std::vector<vtkSmartPointer<vtkWebGPUComputePass>> ComputePasses;
153 std::unordered_map<vtkSmartPointer<vtkWebGPUComputeBuffer>, wgpu::Buffer> RegisteredBuffers;
154 std::unordered_map<vtkSmartPointer<vtkWebGPUComputeTexture>, wgpu::Texture> RegisteredTextures;
157 std::string Label =
"WebGPU Compute Pipeline";
a simple class to control print indentation
abstract base class for most VTK objects
Hold a reference to a vtkObjectBase instance.
Converts VTK cell connectivity arrays into webgpu primitives using compute shaders.
Internals of the vtkWebGPUComputePass.
A compute pipeline is the orchestrator of a collection of compute passes.
void SetWGPUConfiguration(vtkWebGPUConfiguration *config)
static vtkWebGPUComputePipeline * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkWebGPUComputePipeline()
void DispatchAllPasses()
Dispatch all the compute passes of this compute pipeline in the order they were added.
~vtkWebGPUComputePipeline() override
const std::vector< vtkSmartPointer< vtkWebGPUComputePass > > & GetComputePasses() const
Returns the list of the compute passes that have been added to this compute pipeline.
vtkSmartPointer< vtkWebGPUComputePass > CreateComputePass()
Adds a compute pass to this pipeline.
void ReleaseResources()
Releases the resources used by this pipeline: all compute passes & registered buffers/textures.
void Update()
Executes WebGPU commands and callbacks.
Create a webgpu device for use in rendering and compute pipelines.