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

# SDL\_CancelGPUCommandBuffer(3)

Cancels a command buffer.

## NAME

SDL\_CancelGPUCommandBuffer - Cancels a command buffer.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**bool SDL\_CancelGPUCommandBuffer(**     **SDL\_GPUCommandBuffer \*command\_buffer);**

## DESCRIPTION

None of the enqueued commands are executed.

It is an error to call this function after a swapchain texture has been acquired.

This must be called from the thread the command buffer was acquired on.

You must not reference the command buffer after calling this function.

## FUNCTION PARAMETERS

- *command\_buffer*

  a command buffer.

## RETURN VALUE

Returns true on success, false on error; call

**SDL\_GetError** () for more information.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_WaitAndAcquireGPUSwapchainTexture**(3)](/SDL_WaitAndAcquireGPUSwapchainTexture/3.md), **•**(3), [**SDL\_AcquireGPUCommandBuffer**(3)](/SDL_AcquireGPUCommandBuffer/3.md), **•**(3), [**SDL\_AcquireGPUSwapchainTexture**(3)](/SDL_AcquireGPUSwapchainTexture/3.md)
