GPU
public static class GPU
Summary
Public methods |
|
|---|---|
final external @NonNull GPUInstance |
@FastNativeCreates 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 |
@FastNativeChecks if a specific instance feature is supported by the implementation. |
Public fields
Public methods
createInstance
@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
@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
@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
@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. |