# GPU

Artifact: [androidx.webgpu:webgpu](https://developer.android.com/jetpack/androidx/releases/webgpu) [View Source](https://cs.android.com/search?q=file:androidx/webgpu/Functions.kt+class:androidx.webgpu.GPU) Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

*** ** * ** ***


```
public static class GPU
```

<br />

*** ** * ** ***

## Summary

| ### Public fields |
|---|---|
| `static @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPU` | `https://developer.android.com/reference/androidx/webgpu/GPU#INSTANCE()` |

| ### Public methods |
|---|---|
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUInstance` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPU#createInstance(androidx.webgpu.GPUInstanceDescriptor)(https://developer.android.com/reference/androidx/webgpu/GPUInstanceDescriptor descriptor)` Creates a new WebGPU instance. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUSupportedInstanceFeatures` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPU#getInstanceFeatures(androidx.webgpu.GPUSupportedInstanceFeatures)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUSupportedInstanceFeatures features)` Retrieves the list of features supported by the instance. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUInstanceLimits` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPU#getInstanceLimits(androidx.webgpu.GPUInstanceLimits)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUInstanceLimits limits)` Retrieves the limits supported by the instance. |
| `final external boolean` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPU#hasInstanceFeature(kotlin.Int)(int feature)` Checks if a specific feature is supported by the instance. |

## Public fields

### INSTANCE

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public static @NonNull GPU INSTANCE
```

## Public methods

### createInstance

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
@FastNative
public final external @NonNull GPUInstance createInstance(GPUInstanceDescriptor descriptor)
```

Creates a new WebGPU instance.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/webgpu/GPUInstanceDescriptor descriptor` | The descriptor for the instance. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUInstance` | A handle to the created instance. |

### getInstanceFeatures

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
@FastNative
public final external @NonNull GPUSupportedInstanceFeatures getInstanceFeatures(@NonNull GPUSupportedInstanceFeatures features)
```

Retrieves the list of features supported by the instance.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUSupportedInstanceFeatures features` | A structure to be filled with the supported features. |

### getInstanceLimits

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
@FastNative
public final external @NonNull GPUInstanceLimits getInstanceLimits(@NonNull GPUInstanceLimits limits)
```

Retrieves the limits supported by the instance.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUInstanceLimits limits` | A structure to be filled with the supported limits. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUInstanceLimits` | The status of the operation. |

### hasInstanceFeature

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
@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. Value is one of the following: - `1` - `2` - `3` <br /> |

| Returns |
|---|---|
| `boolean` | {@code true} if the feature is supported, {@code false} otherwise. |