public static class GPU


Summary

Public fields

static @NonNull GPU

Public methods

final external @NonNull GPUInstance

Creates a new WebGPU instance.

final external @NonNull GPUSupportedInstanceFeatures

Retrieves the list of features supported by the instance.

final external @NonNull GPUInstanceLimits

Retrieves the limits supported by the instance.

final external boolean

Checks if a specific feature is supported by the instance.

Public fields

INSTANCE

Added in 1.0.0-alpha04
public static @NonNull GPU INSTANCE

Public methods

createInstance

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

Creates a new WebGPU instance.

Parameters
GPUInstanceDescriptor descriptor

The descriptor for the instance.

Returns
@NonNull GPUInstance

A handle to the created instance.

getInstanceFeatures

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

Retrieves the list of features supported by the instance.

Parameters
@NonNull GPUSupportedInstanceFeatures features

A structure to be filled with the supported features.

getInstanceLimits

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

Retrieves the limits supported by the instance.

Parameters
@NonNull GPUInstanceLimits limits

A structure to be filled with the supported limits.

Returns
@NonNull GPUInstanceLimits

The status of the operation.

hasInstanceFeature

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

Checks if a specific feature is supported by the instance.

Parameters
int feature

The feature to check for.

Returns
boolean

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