---
name: "SDL_GPUSwapchainComposition"
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_GPUSwapchainComposition"
---

# SDL\_GPUSwapchainComposition(3type)

Specifies the texture format and colorspace of the swapchain textures.

## NAME

SDL\_GPUSwapchainComposition - Specifies the texture format and colorspace of the swapchain textures.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**typedef enum SDL\_GPUSwapchainComposition** **{**     **SDL\_GPU\_SWAPCHAINCOMPOSITION\_SDR,**     **SDL\_GPU\_SWAPCHAINCOMPOSITION\_SDR\_LINEAR,**     **SDL\_GPU\_SWAPCHAINCOMPOSITION\_HDR\_EXTENDED\_LINEAR,**     **SDL\_GPU\_SWAPCHAINCOMPOSITION\_HDR10\_ST2084** **} SDL\_GPUSwapchainComposition;**

## DESCRIPTION

SDR will always be supported. Other compositions may not be supported on certain systems.

It is recommended to query

**SDL\_WindowSupportsGPUSwapchainComposition**

after claiming the window if you wish to change the swapchain composition from SDR.

• SDR: B8G8R8A8 or R8G8B8A8 swapchain. Pixel values are in sRGB encoding.

• SDR\_LINEAR: B8G8R8A8\_SRGB or R8G8B8A8\_SRGB swapchain. Pixel values are\
   stored in memory in sRGB encoding but accessed in shaders in "linear\
   sRGB" encoding which is sRGB but with a linear transfer function.

• HDR\_EXTENDED\_LINEAR: R16G16B16A16\_FLOAT swapchain. Pixel values are in\
   extended linear sRGB encoding and permits values outside of the \[0, 1\]\
   range.

• HDR10\_ST2084: A2R10G10B10 or A2B10G10R10 swapchain. Pixel values are in\
   BT.2020 ST2084 (PQ) encoding.

## AVAILABILITY

This enum is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_SetGPUSwapchainParameters**(3)](/SDL_SetGPUSwapchainParameters/3.md), **•**(3), [**SDL\_WindowSupportsGPUSwapchainComposition**(3)](/SDL_WindowSupportsGPUSwapchainComposition/3.md), **•**(3), [**SDL\_WaitAndAcquireGPUSwapchainTexture**(3)](/SDL_WaitAndAcquireGPUSwapchainTexture/3.md)
