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
Hold a reference to a vtkObjectBase instance.
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()
friend class vtkWebGPURenderer
friend class vtkWebGPUCellToPrimitiveConverter
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.
friend class vtkWebGPUComputePassInternals
void ReleaseResources()
Releases the resources used by this pipeline: all compute passes & registered buffers/textures.
friend class vtkWebGPURenderWindow
void Update()
Executes WebGPU commands and callbacks.
Create a webgpu device for use in rendering and compute pipelines.