# 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)

*** ** * ** ***


```
class GPUDevice : AutoCloseable
```

<br />

*** ** * ** ***

A logical graphics device.

## Summary

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

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDevice#handle()` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUQueue` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDevice#queue()` |

## Public functions

### close

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

```
open external fun close(): Unit
```

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
external fun createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup
```

Creates a new bind group.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun createBindGroupLayout(
    descriptor: GPUBindGroupLayoutDescriptor = GPUBindGroupLayoutDescriptor()
): GPUBindGroupLayout
```

Creates a new bind group layout.

| Parameters |
|---|---|
| `descriptor: https://developer.android.com/reference/kotlin/androidx/webgpu/GPUBindGroupLayoutDescriptor = GPUBindGroupLayoutDescriptor()` | The descriptor for the bind group layout. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer
```

Creates a new buffer.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun createCommandEncoder(descriptor: GPUCommandEncoderDescriptor? = null): GPUCommandEncoder
```

Creates a new command encoder.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline
```

Creates a new compute pipeline.

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

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

### createComputePipelineAndAwait

```
suspend fun createComputePipelineAndAwait(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline
```

Asynchronously creates a new compute pipeline.

| Parameters |
|---|---|
| `descriptor: https://developer.android.com/reference/kotlin/androidx/webgpu/GPUComputePipelineDescriptor` | 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
external fun createComputePipelineAsync(
    descriptor: GPUComputePipelineDescriptor,
    callbackExecutor: Executor,
    callback: GPURequestCallback<GPUComputePipeline>
): Unit
```

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
external fun createErrorExternalTexture(): GPUExternalTexture
```

### createExternalTexture

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

```
@ExperimentalWebGpuApi
@FastNative
external fun createExternalTexture(
    externalTextureDescriptor: GPUExternalTextureDescriptor
): GPUExternalTexture
```

### createPipelineLayout

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

```
@FastNative
external fun createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout
```

Creates a new pipeline layout.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet
```

Creates a new query set.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder
```

Creates a new render bundle encoder.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline
```

Creates a new render pipeline.

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

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

### createRenderPipelineAndAwait

```
suspend fun createRenderPipelineAndAwait(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline
```

Asynchronously creates a new render pipeline.

| Parameters |
|---|---|
| `descriptor: https://developer.android.com/reference/kotlin/androidx/webgpu/GPURenderPipelineDescriptor` | 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
external fun createRenderPipelineAsync(
    descriptor: GPURenderPipelineDescriptor,
    callbackExecutor: Executor,
    callback: GPURequestCallback<GPURenderPipeline>
): Unit
```

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
external fun createSampler(descriptor: GPUSamplerDescriptor? = null): GPUSampler
```

Creates a new sampler.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun createShaderModule(
    descriptor: GPUShaderModuleDescriptor = GPUShaderModuleDescriptor()
): GPUShaderModule
```

Creates a new shader module.

| Parameters |
|---|---|
| `descriptor: https://developer.android.com/reference/kotlin/androidx/webgpu/GPUShaderModuleDescriptor = GPUShaderModuleDescriptor()` | The descriptor for the shader module. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun createTexture(descriptor: GPUTextureDescriptor): GPUTexture
```

Creates a new texture.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun destroy(): Unit
```

Destroys the device and releases its resources.

### equals

```
open operator fun equals(other: Any?): Boolean
```

### getAdapterInfo

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

```
@FastNative
external fun getAdapterInfo(): GPUAdapterInfo
```

Retrieves information about the adapter that created this device.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun getFeatures(): GPUSupportedFeatures
```

Retrieves the list of features supported by the device.

### getLimits

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

```
@FastNative
external fun getLimits(): GPULimits
```

Retrieves the limits supported by the device.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun getQueue(): GPUQueue
```

Gets the default queue for the device.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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
external fun hasFeature(feature: Int): Boolean
```

Checks if a specific feature is supported by the device.

| Parameters |
|---|---|
| `feature: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | 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 |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | {@code true} if the feature is supported, {@code false} otherwise. |

### hashCode

```
open fun hashCode(): Int
```

### popErrorScope

```
suspend fun popErrorScope(): Int
```

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
external fun popErrorScope(
    callbackExecutor: Executor,
    callback: GPURequestCallback<Int>
): Unit
```

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
external fun pushErrorScope(filter: Int): Unit
```

Pushes an error scope onto the error scope stack.

| Parameters |
|---|---|
| `filter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The filter for the types of errors to capture. Value is one of the following: - `1` - `2` - `3` <br /> |

### setLabel

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

```
@FastNative
external fun setLabel(label: String): Unit
```

Sets a human-readable label for debugging.

| Parameters |
|---|---|
| `label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The label string. |

## Public properties

### handle

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

```
val handle: Long
```

### queue

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

```
val queue: GPUQueue
```