# BufferUsage

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

*** ** * ** ***


```
class BufferUsage
```

<br />

*** ** * ** ***

Defines the valid usages for a buffer.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BufferUsage#CopyDst() = 8` Allows the buffer to be the destination of a copy operation. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BufferUsage#CopySrc() = 4` Allows the buffer to be the source of a copy operation. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BufferUsage#Index() = 16` Allows the buffer to be used as an index buffer. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BufferUsage#Indirect() = 256` Allows the buffer to be used for indirect draw or dispatch calls. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BufferUsage#MapRead() = 1` Allows the buffer to be mapped for reading. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BufferUsage#MapWrite() = 2` Allows the buffer to be mapped for writing. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BufferUsage#None() = 0` No usage is specified. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BufferUsage#QueryResolve() = 512` Allows the buffer to be used as the destination for a query resolve operation. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BufferUsage#Storage() = 128` Allows the buffer to be used as a storage buffer. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BufferUsage#Uniform() = 64` Allows the buffer to be used as a uniform buffer. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BufferUsage#Vertex() = 32` Allows the buffer to be used as a vertex buffer. |

| ### Public companion functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/BufferUsage#toString(kotlin.Int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

## Constants

### CopyDst

```
const val CopyDst = 8: Int
```

Allows the buffer to be the destination of a copy operation.

### CopySrc

```
const val CopySrc = 4: Int
```

Allows the buffer to be the source of a copy operation.

### Index

```
const val Index = 16: Int
```

Allows the buffer to be used as an index buffer.

### Indirect

```
const val Indirect = 256: Int
```

Allows the buffer to be used for indirect draw or dispatch calls.

### MapRead

```
const val MapRead = 1: Int
```

Allows the buffer to be mapped for reading.

### MapWrite

```
const val MapWrite = 2: Int
```

Allows the buffer to be mapped for writing.

### None

```
const val None = 0: Int
```

No usage is specified.

### QueryResolve

```
const val QueryResolve = 512: Int
```

Allows the buffer to be used as the destination for a query resolve operation.

### Storage

```
const val Storage = 128: Int
```

Allows the buffer to be used as a storage buffer.

### Uniform

```
const val Uniform = 64: Int
```

Allows the buffer to be used as a uniform buffer.

### Vertex

```
const val Vertex = 32: Int
```

Allows the buffer to be used as a vertex buffer.

## Public companion functions

### toString

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

```
fun toString(value: Int): String
```