---
name: "SDL_GPUBufferUsageFlags"
section: "3type"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GPUBufferUsageFlags"
---

# SDL\_GPUBufferUsageFlags(3type)

Specifies how a buffer is intended to be used by the client.

## NAME

SDL\_GPUBufferUsageFlags - Specifies how a buffer is intended to be used by the client.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**typedef Uint32 SDL\_GPUBufferUsageFlags;** **#define SDL\_GPU\_BUFFERUSAGE\_VERTEX                                  (1u \<\< 0) /\*\*\< Buffer is a vertex buffer. \*/** **#define SDL\_GPU\_BUFFERUSAGE\_INDEX                                   (1u \<\< 1) /\*\*\< Buffer is an index buffer. \*/** **#define SDL\_GPU\_BUFFERUSAGE\_INDIRECT                                (1u \<\< 2) /\*\*\< Buffer is an indirect buffer. \*/** **#define SDL\_GPU\_BUFFERUSAGE\_GRAPHICS\_STORAGE\_READ                   (1u \<\< 3) /\*\*\< Buffer supports storage reads in graphics stages. \*/** **#define SDL\_GPU\_BUFFERUSAGE\_COMPUTE\_STORAGE\_READ                    (1u \<\< 4) /\*\*\< Buffer supports storage reads in the compute stage. \*/** **#define SDL\_GPU\_BUFFERUSAGE\_COMPUTE\_STORAGE\_WRITE                   (1u \<\< 5) /\*\*\< Buffer supports storage writes in the compute stage. \*/**

## DESCRIPTION

A buffer must have at least one usage flag. Note that some usage flag combinations are invalid.

Unlike textures, READ \| WRITE can be used for simultaneous read-write usage. The same data synchronization concerns as textures apply.

If you use a STORAGE flag, the data in the buffer must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

## AVAILABILITY

This datatype is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_CreateGPUBuffer**(3)](/SDL_CreateGPUBuffer/3.md)
