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