18 #ifndef vtkWebGPUConfiguration_h
19 #define vtkWebGPUConfiguration_h
25 #include "vtkRenderingWebGPUModule.h"
31 VTK_ABI_NAMESPACE_BEGIN
77 vtkSetEnumMacro(PowerPreference, PowerPreferenceType);
78 vtkGetEnumMacro(PowerPreference, PowerPreferenceType);
109 vtkSetMacro(Timeout,
double);
110 vtkGetMacro(Timeout,
double);
116 static void SetDefaultTimeout(
double);
135 wgpu::Adapter GetAdapter();
136 wgpu::Device GetDevice();
137 wgpu::Instance GetInstance();
164 void FinalizeDevice();
191 void ProcessEvents();
199 static std::size_t Align(std::size_t
value, std::size_t alignment);
219 std::uint32_t GetAdapterVendorID();
220 std::uint32_t GetAdapterDeviceID();
231 bool IsAMDGPUInUse();
232 bool IsAppleGPUInUse();
233 bool IsARMGPUInUse();
234 bool IsBroadcomGPUInUse();
235 bool IsIntelGPUInUse();
236 bool IsMesaGPUInUse();
237 bool IsMicrosoftGPUInUse();
238 bool IsNVIDIAGPUInUse();
239 bool IsSamsungGPUInUse();
248 wgpu::Buffer CreateBuffer(std::uint64_t sizeBytes, wgpu::BufferUsage usage,
249 bool mappedAtCreation =
false,
const char* label =
nullptr);
250 wgpu::Buffer CreateBuffer(
const wgpu::BufferDescriptor& bufferDescriptor);
257 void WriteBuffer(
const wgpu::Buffer& buffer, std::uint64_t
offset,
const void*
data,
258 std::size_t sizeBytes,
const char*
description =
nullptr);
264 wgpu::Texture CreateTexture(wgpu::Extent3D extents, wgpu::TextureDimension dimension,
265 wgpu::TextureFormat format, wgpu::TextureUsage usage,
int mipLevelCount = 1,
266 const char* label =
nullptr);
267 wgpu::Texture CreateTexture(
const wgpu::TextureDescriptor& textureDescriptor);
273 wgpu::TextureView CreateView(wgpu::Texture texture, wgpu::TextureViewDimension dimension,
274 wgpu::TextureAspect aspect, wgpu::TextureFormat format,
int baseMipLevel,
int mipLevelCount,
275 const char* label =
nullptr);
276 wgpu::TextureView CreateView(
277 wgpu::Texture texture,
const wgpu::TextureViewDescriptor& viewDescriptor);
283 void WriteTexture(wgpu::Texture texture, uint32_t bytesPerRow, uint32_t byteSize,
284 const void*
data, uint32_t srcOffset = 0, wgpu::Origin3D dstOffset = { 0, 0, 0 },
285 uint32_t dstMipLevel = 0,
const char*
description =
nullptr);
309 void DumpMemoryStatistics();
320 std::unique_ptr<vtkWebGPUConfigurationInternals> Internals;
331 bool InstanceRefHeld =
false;
334 VTK_ABI_NAMESPACE_END
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
PowerPreferenceType
These enums have a one-one correspondence with the webgpu enums.
a simple class to control print indentation
Create a webgpu device for use in rendering and compute pipelines.
A compute pipeline is the orchestrator of a collection of compute passes.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...