---
name: "SDL_CalculateGPUTextureFormatSize"
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_CalculateGPUTextureFormatSize"
---

# SDL\_CalculateGPUTextureFormatSize(3)

Calculate the size in bytes of a texture format with dimensions.

## NAME

SDL\_CalculateGPUTextureFormatSize - Calculate the size in bytes of a texture format with dimensions.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**Uint32 SDL\_CalculateGPUTextureFormatSize(**     **SDL\_GPUTextureFormat format,**     **Uint32 width,**     **Uint32 height,**     **Uint32 depth\_or\_layer\_count);**

## FUNCTION PARAMETERS

- *format*

  a texture format.

- *width*

  width in pixels.

- *height*

  height in pixels.

- *depth\_or\_layer\_count*

  depth for 3D textures or layer count otherwise.

## RETURN VALUE

( **Uint32** ) Returns the size of a texture with this format and dimensions.

## AVAILABILITY

This function is available since SDL 3.2.0.
