FunctionsKt

Added in 1.0.0-alpha01

public final class FunctionsKt


Summary

Public methods

static final external @NonNull GPUInstance

Creates a new WebGPU instance object.

static final external @NonNull SupportedInstanceFeatures

Gets the set of instance features supported by the implementation.

static final external @NonNull InstanceLimits

Gets the limits supported by the instance.

static final external boolean

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

Public methods

createInstance

@FastNative
public static final external @NonNull GPUInstance createInstance(InstanceDescriptor descriptor)

Creates a new WebGPU instance object.

Parameters
InstanceDescriptor descriptor

A descriptor specifying creation options for the instance.

Returns
@NonNull GPUInstance

The newly created WebGPU instance.

getInstanceFeatures

@FastNative
public static final external @NonNull SupportedInstanceFeatures getInstanceFeatures(@NonNull SupportedInstanceFeatures features)

Gets the set of instance features supported by the implementation.

Parameters
@NonNull SupportedInstanceFeatures features

A structure to be filled with the supported instance features.

getInstanceLimits

@FastNative
public static final external @NonNull InstanceLimits getInstanceLimits(@NonNull InstanceLimits limits)

Gets the limits supported by the instance.

Parameters
@NonNull InstanceLimits limits

A structure to be filled with the instance limits.

Returns
@NonNull InstanceLimits

Status code of the operation.

hasInstanceFeature

@FastNative
public static 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.