public static class GPU


Summary

Public fields

static @NonNull GPU

Public methods

final external @NonNull GPUInstance

Creates a new WebGPU instance object.

final external @NonNull GPUSupportedInstanceFeatures

Gets the set of instance features supported by the implementation.

final external @NonNull GPUInstanceLimits

Gets the limits supported by the instance.

final external boolean

Checks if a specific instance feature is supported by the implementation.

Public fields

INSTANCE

Added in 1.0.0-alpha02
public static @NonNull GPU INSTANCE

Public methods

createInstance

Added in 1.0.0-alpha02
@FastNative
public final external @NonNull GPUInstance createInstance(GPUInstanceDescriptor descriptor)

Creates a new WebGPU instance object.

Parameters
GPUInstanceDescriptor descriptor

A descriptor specifying creation options for the instance.

Returns
@NonNull GPUInstance

The newly created WebGPU instance.

getInstanceFeatures

Added in 1.0.0-alpha02
@FastNative
public final external @NonNull GPUSupportedInstanceFeatures getInstanceFeatures(@NonNull GPUSupportedInstanceFeatures features)

Gets the set of instance features supported by the implementation.

Parameters
@NonNull GPUSupportedInstanceFeatures features

A structure to be filled with the supported instance features.

getInstanceLimits

Added in 1.0.0-alpha02
@FastNative
public final external @NonNull GPUInstanceLimits getInstanceLimits(@NonNull GPUInstanceLimits limits)

Gets the limits supported by the instance.

Parameters
@NonNull GPUInstanceLimits limits

A structure to be filled with the instance limits.

Returns
@NonNull GPUInstanceLimits

Status code of the operation.

hasInstanceFeature

Added in 1.0.0-alpha02
@FastNative
public final external boolean hasInstanceFeature(int feature)

Checks if a specific instance feature is supported by the implementation.

Parameters
int feature

The instance feature to query.

Returns
boolean

True if the feature is supported, {@code false} otherwise.