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

*** ** * ** ***


```
public final class BufferUsage
```

<br />

*** ** * ** ***

Defines the valid usages for a buffer.

## Summary

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

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/webgpu/BufferUsage#toString(kotlin.Int)(int value)` |

## Constants

### CopyDst

```
public static final int CopyDst = 8
```

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

### CopySrc

```
public static final int CopySrc = 4
```

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

### Index

```
public static final int Index = 16
```

Allows the buffer to be used as an index buffer.

### Indirect

```
public static final int Indirect = 256
```

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

### MapRead

```
public static final int MapRead = 1
```

Allows the buffer to be mapped for reading.

### MapWrite

```
public static final int MapWrite = 2
```

Allows the buffer to be mapped for writing.

### None

```
public static final int None = 0
```

No usage is specified.

### QueryResolve

```
public static final int QueryResolve = 512
```

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

### Storage

```
public static final int Storage = 128
```

Allows the buffer to be used as a storage buffer.

### Uniform

```
public static final int Uniform = 64
```

Allows the buffer to be used as a uniform buffer.

### Vertex

```
public static final int Vertex = 32
```

Allows the buffer to be used as a vertex buffer.

## Public methods

### toString

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

```
public static final @NonNull String toString(int value)
```