---
name: "SDL_GPUShaderFormat"
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_GPUShaderFormat"
---

# SDL\_GPUShaderFormat(3type)

Specifies the format of shader code.

## NAME

SDL\_GPUShaderFormat - Specifies the format of shader code.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**typedef Uint32 SDL\_GPUShaderFormat;** **#define SDL\_GPU\_SHADERFORMAT\_INVALID  0** **#define SDL\_GPU\_SHADERFORMAT\_PRIVATE  (1u \<\< 0) /\*\*\< Shaders for NDA'd platforms. \*/** **#define SDL\_GPU\_SHADERFORMAT\_SPIRV    (1u \<\< 1) /\*\*\< SPIR-V shaders for Vulkan. \*/** **#define SDL\_GPU\_SHADERFORMAT\_DXBC     (1u \<\< 2) /\*\*\< DXBC SM5\_1 shaders for D3D12. \*/** **#define SDL\_GPU\_SHADERFORMAT\_DXIL     (1u \<\< 3) /\*\*\< DXIL SM6\_0 shaders for D3D12. \*/** **#define SDL\_GPU\_SHADERFORMAT\_MSL      (1u \<\< 4) /\*\*\< MSL shaders for Metal. \*/** **#define SDL\_GPU\_SHADERFORMAT\_METALLIB (1u \<\< 5) /\*\*\< Precompiled metallib shaders for Metal. \*/**

## DESCRIPTION

Each format corresponds to a specific backend that accepts it.

## AVAILABILITY

This datatype is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_CreateGPUShader**(3)](/SDL_CreateGPUShader/3.md)
