Class WebGPUEnvironment
- Namespace
- SixLabors.ImageSharp.Drawing.Processing.Backends
- Assembly
- SixLabors.ImageSharp.Drawing.WebGPU.dll
Provides explicit support probes for the library-managed WebGPU environment. Use this type when you want to check availability or compute pipeline support before constructing WebGPU objects.
public static class WebGPUEnvironment
- Inheritance
-
WebGPUEnvironment
- Inherited Members
Properties
Options
Gets or sets the options used when the library-managed WebGPU environment is initialized.
public static WebGPUEnvironmentOptions Options { get; set; }
Property Value
Remarks
Assign this before constructing WebGPU objects or calling support probes. The shared WebGPU runtime reads the current options during first initialization; changing them later does not reconfigure an existing device.
UncapturedError
Gets or sets the callback invoked when the native WebGPU runtime reports an uncaptured device error.
public static Action<WebGPUErrorType, string>? UncapturedError { get; set; }
Property Value
Remarks
The callback can be raised from a native WebGPU callback thread. Keep handlers short and non-blocking. Exceptions thrown by the handler are not propagated back through the native callback.
Methods
ProbeAvailability()
Probes whether the library-managed WebGPU device and queue are available.
public static WebGPUEnvironmentError ProbeAvailability()
Returns
- WebGPUEnvironmentError
Success when the library-managed WebGPU device and queue are available; otherwise, the stable failure code describing why the probe failed.
ProbeComputePipelineSupport()
Probes whether the library-managed WebGPU device can create a trivial compute pipeline.
public static WebGPUEnvironmentError ProbeComputePipelineSupport()
Returns
- WebGPUEnvironmentError
Success when compute pipeline creation succeeds; otherwise, the stable failure code describing why the probe failed.