# GPUBufferDescriptor

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

*** ** * ** ***


```
class GPUBufferDescriptor
```

<br />

*** ** * ** ***

Describes a buffer to be created.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/webgpu/GPUBufferDescriptor.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUBufferDescriptor`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUBufferDescriptor#GPUBufferDescriptor(kotlin.Int,kotlin.Long,kotlin.String,kotlin.Boolean)( usage: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, mappedAtCreation: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUBufferDescriptor#label()` A human-readable label for debugging. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUBufferDescriptor#mappedAtCreation()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUBufferDescriptor#size()` The size of the buffer in bytes. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUBufferDescriptor#usage()` The allowed usages for the buffer. |

## Public constructors

### GPUBufferDescriptor

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

```
GPUBufferDescriptor(
    usage: Int,
    size: Long,
    label: String? = null,
    mappedAtCreation: Boolean = false
)
```

## Public properties

### label

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

```
var label: String?
```

A human-readable label for debugging.

### mappedAtCreation

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

```
var mappedAtCreation: Boolean
```

### size

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

```
var size: Long
```

The size of the buffer in bytes.

### usage

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

```
var usage: Int
```

The allowed usages for the buffer.

Value is either `0` or a combination of the following:

- `0`
- `1`
- `2`
- `4`
- `8`
- `16`
- `32`
- `64`
- `128`
- `256`
- `512`

<br />