---
name: "SDL_GPUCommandBuffer"
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_GPUCommandBuffer"
---

# SDL\_GPUCommandBuffer(3type)

An opaque handle representing a command buffer.

## NAME

SDL\_GPUCommandBuffer - An opaque handle representing a command buffer.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**typedef struct SDL\_GPUCommandBuffer SDL\_GPUCommandBuffer;**

## DESCRIPTION

Most state is managed via command buffers. When setting state using a command buffer, that state is local to the command buffer.

Commands only begin execution on the GPU once

**SDL\_SubmitGPUCommandBuffer**\
  is called. Once the command buffer is submitted, it is no longer valid to use it.

Command buffers are executed in submission order. If you submit command buffer A and then command buffer B all commands in A will begin executing before any command in B begins executing.

In multi-threading scenarios, you should only access a command buffer on the thread you acquired it from.

## AVAILABILITY

This struct is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_AcquireGPUCommandBuffer**(3)](/SDL_AcquireGPUCommandBuffer/3.md), **•**(3), [**SDL\_SubmitGPUCommandBuffer**(3)](/SDL_SubmitGPUCommandBuffer/3.md), **•**(3), [**SDL\_SubmitGPUCommandBufferAndAcquireFence**(3)](/SDL_SubmitGPUCommandBufferAndAcquireFence/3.md)
