# GPUDevice

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

*** ** * ** ***


```
public final class GPUDevice implements AutoCloseable
```

<br />

*** ** * ** ***

A logical graphics device.

## Summary

| ### Public methods |
|---|---|
| `external void` | `https://developer.android.com/reference/androidx/webgpu/GPUDevice#close()()` Decrements the reference count of the object and frees resources when the count reaches zero. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBindGroup` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createBindGroup(androidx.webgpu.GPUBindGroupDescriptor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBindGroupDescriptor descriptor)` Creates a new bind group. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBindGroupLayout` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createBindGroupLayout(androidx.webgpu.GPUBindGroupLayoutDescriptor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBindGroupLayoutDescriptor descriptor)` Creates a new bind group layout. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBuffer` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createBuffer(androidx.webgpu.GPUBufferDescriptor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBufferDescriptor descriptor)` Creates a new buffer. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUCommandEncoder` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createCommandEncoder(androidx.webgpu.GPUCommandEncoderDescriptor)(https://developer.android.com/reference/androidx/webgpu/GPUCommandEncoderDescriptor descriptor)` Creates a new command encoder. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUComputePipeline` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createComputePipeline(androidx.webgpu.GPUComputePipelineDescriptor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUComputePipelineDescriptor descriptor)` Creates a new compute pipeline. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUComputePipeline` | `https://developer.android.com/reference/androidx/webgpu/GPUDevice#createComputePipelineAndAwait(androidx.webgpu.GPUComputePipelineDescriptor)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUComputePipelineDescriptor descriptor )` Asynchronously creates a new compute pipeline. |
| `final external void` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createComputePipelineAsync(androidx.webgpu.GPUComputePipelineDescriptor,java.util.concurrent.Executor,androidx.webgpu.GPURequestCallback)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUComputePipelineDescriptor descriptor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html callbackExecutor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURequestCallback<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUComputePipeline> callback )` Asynchronously creates a new compute pipeline. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUExternalTexture` | `@https://developer.android.com/reference/androidx/webgpu/ExperimentalWebGpuApi @https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createErrorExternalTexture()()` |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUExternalTexture` | `@https://developer.android.com/reference/androidx/webgpu/ExperimentalWebGpuApi @https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createExternalTexture(androidx.webgpu.GPUExternalTextureDescriptor)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUExternalTextureDescriptor externalTextureDescriptor )` |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUPipelineLayout` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createPipelineLayout(androidx.webgpu.GPUPipelineLayoutDescriptor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUPipelineLayoutDescriptor descriptor)` Creates a new pipeline layout. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUQuerySet` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createQuerySet(androidx.webgpu.GPUQuerySetDescriptor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUQuerySetDescriptor descriptor)` Creates a new query set. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderBundleEncoder` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createRenderBundleEncoder(androidx.webgpu.GPURenderBundleEncoderDescriptor)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderBundleEncoderDescriptor descriptor )` Creates a new render bundle encoder. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderPipeline` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createRenderPipeline(androidx.webgpu.GPURenderPipelineDescriptor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderPipelineDescriptor descriptor)` Creates a new render pipeline. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderPipeline` | `https://developer.android.com/reference/androidx/webgpu/GPUDevice#createRenderPipelineAndAwait(androidx.webgpu.GPURenderPipelineDescriptor)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderPipelineDescriptor descriptor )` Asynchronously creates a new render pipeline. |
| `final external void` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createRenderPipelineAsync(androidx.webgpu.GPURenderPipelineDescriptor,java.util.concurrent.Executor,androidx.webgpu.GPURequestCallback)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderPipelineDescriptor descriptor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html callbackExecutor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURequestCallback<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderPipeline> callback )` Asynchronously creates a new render pipeline. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUSampler` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createSampler(androidx.webgpu.GPUSamplerDescriptor)(https://developer.android.com/reference/androidx/webgpu/GPUSamplerDescriptor descriptor)` Creates a new sampler. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUShaderModule` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createShaderModule(androidx.webgpu.GPUShaderModuleDescriptor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUShaderModuleDescriptor descriptor)` Creates a new shader module. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUTexture` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#createTexture(androidx.webgpu.GPUTextureDescriptor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUTextureDescriptor descriptor)` Creates a new texture. |
| `final external void` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#destroy()()` Destroys the device and releases its resources. |
| `boolean` | `https://developer.android.com/reference/androidx/webgpu/GPUDevice#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUAdapterInfo` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#getAdapterInfo()()` Retrieves information about the adapter that created this device. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUSupportedFeatures` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#getFeatures()()` Retrieves the list of features supported by the device. |
| `final long` | `https://developer.android.com/reference/androidx/webgpu/GPUDevice#getHandle()()` |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPULimits` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#getLimits()()` Retrieves the limits supported by the device. |
| `final external @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUQueue` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#getQueue()()` Gets the default queue for the device. |
| `final external boolean` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#hasFeature(kotlin.Int)(int feature)` Checks if a specific feature is supported by the device. |
| `int` | `https://developer.android.com/reference/androidx/webgpu/GPUDevice#hashCode()()` |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUDevice#popErrorScope()()` Asynchronously pops an error scope from the error scope stack. |
| `final external void` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#popErrorScope(java.util.concurrent.Executor,androidx.webgpu.GPURequestCallback)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html callbackExecutor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURequestCallback<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> callback )` Asynchronously pops an error scope from the error scope stack. |
| `final external void` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#pushErrorScope(kotlin.Int)(int filter)` Pushes an error scope onto the error scope stack. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUQueue` | `https://developer.android.com/reference/androidx/webgpu/GPUDevice#queue()()` |
| `final external void` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUDevice#setLabel(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html label)` Sets a human-readable label for debugging. |

## Public methods

### close

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

```
public external void close()
```

Decrements the reference count of the object and frees resources when the count reaches zero.

This is the standard way to manage object lifetimes and should be used in `use` blocks. After calling this, the object is no longer usable.

### createBindGroup

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

```
@FastNative
public final external @NonNull GPUBindGroup createBindGroup(@NonNull GPUBindGroupDescriptor descriptor)
```

Creates a new bind group.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBindGroupDescriptor descriptor` | The descriptor for the bind group. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBindGroup` | The created bind group. |

### createBindGroupLayout

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

```
@FastNative
public final external @NonNull GPUBindGroupLayout createBindGroupLayout(@NonNull GPUBindGroupLayoutDescriptor descriptor)
```

Creates a new bind group layout.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBindGroupLayoutDescriptor descriptor` | The descriptor for the bind group layout. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBindGroupLayout` | The created bind group layout. |

### createBuffer

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

```
@FastNative
public final external @NonNull GPUBuffer createBuffer(@NonNull GPUBufferDescriptor descriptor)
```

Creates a new buffer.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBufferDescriptor descriptor` | The descriptor for the buffer. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUBuffer` | The created buffer, or {@code null} on failure. |

### createCommandEncoder

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

```
@FastNative
public final external @NonNull GPUCommandEncoder createCommandEncoder(GPUCommandEncoderDescriptor descriptor)
```

Creates a new command encoder.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/webgpu/GPUCommandEncoderDescriptor descriptor` | The descriptor for the command encoder. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUCommandEncoder` | The created command encoder. |

### createComputePipeline

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

```
@FastNative
public final external @NonNull GPUComputePipeline createComputePipeline(@NonNull GPUComputePipelineDescriptor descriptor)
```

Creates a new compute pipeline.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUComputePipelineDescriptor descriptor` | The descriptor for the compute pipeline. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUComputePipeline` | The created compute pipeline. |

### createComputePipelineAndAwait

```
public final @NonNull GPUComputePipeline createComputePipelineAndAwait(
    @NonNull GPUComputePipelineDescriptor descriptor
)
```

Asynchronously creates a new compute pipeline.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUComputePipelineDescriptor descriptor` | The descriptor for the compute pipeline. |

### createComputePipelineAsync

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

```
@FastNative
public final external void createComputePipelineAsync(
    @NonNull GPUComputePipelineDescriptor descriptor,
    @NonNull Executor callbackExecutor,
    @NonNull GPURequestCallback<@NonNull GPUComputePipeline> callback
)
```

Asynchronously creates a new compute pipeline.

### createErrorExternalTexture

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

```
@ExperimentalWebGpuApi
@FastNative
public final external @NonNull GPUExternalTexture createErrorExternalTexture()
```

### createExternalTexture

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

```
@ExperimentalWebGpuApi
@FastNative
public final external @NonNull GPUExternalTexture createExternalTexture(
    @NonNull GPUExternalTextureDescriptor externalTextureDescriptor
)
```

### createPipelineLayout

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

```
@FastNative
public final external @NonNull GPUPipelineLayout createPipelineLayout(@NonNull GPUPipelineLayoutDescriptor descriptor)
```

Creates a new pipeline layout.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUPipelineLayoutDescriptor descriptor` | The descriptor for the pipeline layout. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUPipelineLayout` | The created pipeline layout. |

### createQuerySet

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

```
@FastNative
public final external @NonNull GPUQuerySet createQuerySet(@NonNull GPUQuerySetDescriptor descriptor)
```

Creates a new query set.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUQuerySetDescriptor descriptor` | The descriptor for the query set. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUQuerySet` | The created query set. |

### createRenderBundleEncoder

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

```
@FastNative
public final external @NonNull GPURenderBundleEncoder createRenderBundleEncoder(
    @NonNull GPURenderBundleEncoderDescriptor descriptor
)
```

Creates a new render bundle encoder.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderBundleEncoderDescriptor descriptor` | The descriptor for the render bundle encoder. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderBundleEncoder` | The created render bundle encoder. |

### createRenderPipeline

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

```
@FastNative
public final external @NonNull GPURenderPipeline createRenderPipeline(@NonNull GPURenderPipelineDescriptor descriptor)
```

Creates a new render pipeline.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderPipelineDescriptor descriptor` | The descriptor for the render pipeline. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderPipeline` | The created render pipeline. |

### createRenderPipelineAndAwait

```
public final @NonNull GPURenderPipeline createRenderPipelineAndAwait(
    @NonNull GPURenderPipelineDescriptor descriptor
)
```

Asynchronously creates a new render pipeline.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPURenderPipelineDescriptor descriptor` | The descriptor for the render pipeline. |

### createRenderPipelineAsync

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

```
@FastNative
public final external void createRenderPipelineAsync(
    @NonNull GPURenderPipelineDescriptor descriptor,
    @NonNull Executor callbackExecutor,
    @NonNull GPURequestCallback<@NonNull GPURenderPipeline> callback
)
```

Asynchronously creates a new render pipeline.

### createSampler

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

```
@FastNative
public final external @NonNull GPUSampler createSampler(GPUSamplerDescriptor descriptor)
```

Creates a new sampler.

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

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUSampler` | The created sampler. |

### createShaderModule

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

```
@FastNative
public final external @NonNull GPUShaderModule createShaderModule(@NonNull GPUShaderModuleDescriptor descriptor)
```

Creates a new shader module.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUShaderModuleDescriptor descriptor` | The descriptor for the shader module. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUShaderModule` | The created shader module. |

### createTexture

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

```
@FastNative
public final external @NonNull GPUTexture createTexture(@NonNull GPUTextureDescriptor descriptor)
```

Creates a new texture.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUTextureDescriptor descriptor` | The descriptor for the texture. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUTexture` | The created texture. |

### destroy

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

```
@FastNative
public final external void destroy()
```

Destroys the device and releases its resources.

### equals

```
public boolean equals(Object other)
```

### getAdapterInfo

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

```
@FastNative
public final external @NonNull GPUAdapterInfo getAdapterInfo()
```

Retrieves information about the adapter that created this device.

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

### getFeatures

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

```
@FastNative
public final external @NonNull GPUSupportedFeatures getFeatures()
```

Retrieves the list of features supported by the device.

### getHandle

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

```
public final long getHandle()
```

### getLimits

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

```
@FastNative
public final external @NonNull GPULimits getLimits()
```

Retrieves the limits supported by the device.

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

### getQueue

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

```
@FastNative
public final external @NonNull GPUQueue getQueue()
```

Gets the default queue for the device.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUQueue` | The default queue. |

### hasFeature

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

```
@FastNative
public final external boolean hasFeature(int feature)
```

Checks if a specific feature is supported by the device.

| Parameters |
|---|---|
| `int feature` | The feature to check for. Value is one of the following: - `1` - `2` - `3` - `4` - `5` - `6` - `7` - `8` - `9` - `10` - `11` - `12` - `13` - `14` - `15` - `16` - `17` - `18` - `19` - `20` - `21` - `22` - `23` - `327710` - `327719` - `327725` - `327741` <br /> |

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

### hashCode

```
public int hashCode()
```

### popErrorScope

```
public final int popErrorScope()
```

Asynchronously pops an error scope from the error scope stack.

### popErrorScope

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

```
@FastNative
public final external void popErrorScope(
    @NonNull Executor callbackExecutor,
    @NonNull GPURequestCallback<@NonNull Integer> callback
)
```

Asynchronously pops an error scope from the error scope stack.

### pushErrorScope

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

```
@FastNative
public final external void pushErrorScope(int filter)
```

Pushes an error scope onto the error scope stack.

| Parameters |
|---|---|
| `int filter` | The filter for the types of errors to capture. Value is one of the following: - `1` - `2` - `3` <br /> |

### queue

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

```
public final @NonNull GPUQueue queue()
```

### setLabel

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

```
@FastNative
public final external void setLabel(@NonNull String label)
```

Sets a human-readable label for debugging.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html label` | The label string. |