---
name: "SDL_WaitForGPUFences"
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_WaitForGPUFences"
---

# SDL\_WaitForGPUFences(3)

Blocks the thread until the given fences are signaled.

## NAME

SDL\_WaitForGPUFences - Blocks the thread until the given fences are signaled.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**bool SDL\_WaitForGPUFences(**     **SDL\_GPUDevice \*device,**     **bool wait\_all,**     **SDL\_GPUFence \*const \*fences,**     **Uint32 num\_fences);**

## FUNCTION PARAMETERS

- *device*

  a GPU context.

- *wait\_all*

  if 0, wait for any fence to be signaled, if 1, wait for all fences to be signaled.

- *fences*

  an array of fences to wait on.

- *num\_fences*

  the number of fences in the fences array.

## RETURN VALUE

Returns true on success, false on failure; call

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

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_SubmitGPUCommandBufferAndAcquireFence**(3)](/SDL_SubmitGPUCommandBufferAndAcquireFence/3.md), **•**(3), [**SDL\_WaitForGPUIdle**(3)](/SDL_WaitForGPUIdle/3.md)
