Expand description
Universal format specification. Applicable to textures, views, and vertex buffers.
For a more detailed description of all the specific format specifiers, please see the official Vulkan documentation
gfx-rs
splits a Format
into two sub-components, a SurfaceType
and
a ChannelType
. The SurfaceType
specifies how the large the channels are,
for instance R32_G32_B32_A32
. The ChannelType
specifies how the
components are interpreted, for instance Sfloat
or Sint
.
Structs§
- A1r5g5b5
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - A2b10g10r10
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - A2b10g10r10
Snorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - A2b10g10r10
Sscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - A2b10g10r10
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - A2b10g10r10
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - A2b10g10r10
Uscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - A2r10g10b10
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - A2r10g10b10
Snorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - A2r10g10b10
Sscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - A2r10g10b10
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - A2r10g10b10
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - A2r10g10b10
Uscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Abgr8
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Abgr8
Snorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Abgr8
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Abgr8
Sscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Abgr8
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Abgr8
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Abgr8
Uscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Aspects
- Bitflags which describe what properties of an image
a format specifies or does not specify. For example,
the
Rgba8Unorm
format only specifies aCOLOR
aspect, whileD32SfloatS8Uint
specifies both a depth and stencil aspect but no color. - Astc4x4
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc4x4
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc5x4
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc5x4
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc5x5
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc5x5
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc6x5
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc6x5
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc6x6
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc6x6
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc8x5
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc8x5
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc8x6
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc8x6
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc8x8
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc8x8
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc10x5
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc10x5
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc10x6
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc10x6
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc10x8
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc10x8
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc10x10
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc10x10
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc12x10
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc12x10
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc12x12
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Astc12x12
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - B5g5r5a1
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - B5g6r5
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - B10g11r11
Ufloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Base
Format - Generic run-time base format.
- Bc1Rgb
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc1Rgb
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc1Rgba
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc1Rgba
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc2Srgb
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc2Unorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc3Srgb
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc3Unorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc4Snorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc4Unorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc5Snorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc5Unorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc6h
Sfloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc6h
Ufloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc7Srgb
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bc7Unorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgr8
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgr8
Snorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgr8
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgr8
Sscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgr8
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgr8
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgr8
Uscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgra4
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgra8
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgra8
Snorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgra8
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgra8
Sscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgra8
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgra8
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Bgra8
Uscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Buffer
Feature - Buffer feature flags.
- D16Unorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - D16Unorm
S8Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - D24Unorm
S8Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - D32Sfloat
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - D32Sfloat
S8Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - DrmFormat
Properties - Drm format properties
- E5b9g9r9
Ufloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - EacR11
Snorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - EacR11
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - EacR11g11
Snorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - EacR11g11
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Etc2
R8g8b8 Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Etc2
R8g8b8 Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Etc2
R8g8b8a1 Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Etc2
R8g8b8a1 Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Etc2
R8g8b8a8 Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Etc2
R8g8b8a8 Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Format
Bits - Description of the bits distribution of a format.
- Format
Desc - Description of a format.
- Image
Feature - Image feature flags.
- Properties
- Format properties of the physical device.
- R5g5b5a1
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R5g6b5
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R8Sint
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R8Snorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R8Srgb
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R8Sscaled
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R8Uint
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R8Unorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R8Uscaled
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R16Sfloat
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R16Sint
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R16Snorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R16Sscaled
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R16Uint
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R16Unorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R16Uscaled
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R32Sfloat
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R32Sint
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R32Uint
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R64Sfloat
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R64Sint
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - R64Uint
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg4Unorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg8Sint
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg8Snorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg8Srgb
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg8Sscaled
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg8Uint
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg8Unorm
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg8Uscaled
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg16
Sfloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg16
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg16
Snorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg16
Sscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg16
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg16
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg16
Uscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg32
Sfloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg32
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg32
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg64
Sfloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg64
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rg64
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb8
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb8
Snorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb8
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb8
Sscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb8
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb8
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb8
Uscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb16
Sfloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb16
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb16
Snorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb16
Sscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb16
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb16
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb16
Uscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb32
Sfloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb32
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb32
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb64
Sfloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb64
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgb64
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba4
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba8
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba8
Snorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba8
Srgb - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba8
Sscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba8
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba8
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba8
Uscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba16
Sfloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba16
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba16
Snorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba16
Sscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba16
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba16
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba16
Uscaled - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba32
Sfloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba32
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba32
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba64
Sfloat - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba64
Sint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Rgba64
Uint - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - S8Uint
- A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats. - Swizzle
- Channel swizzle configuration for the resource views.
This specifies a “swizzle” operation which remaps the various
channels of a format into a different order. For example,
Swizzle(Component::B, Component::G, Component::R, Component::A)
will swapRGBA
formats intoBGRA
formats and back. - X8D24
Unorm - A struct equivalent to the matching
Format
enum member, which allows an API to be strongly typed on particular formats.
Enums§
- Channel
Type - Type of a surface channel. This is how we interpret the
storage allocated with
SurfaceType
. - Component
- Source channel in a swizzle configuration. Some may redirect onto different physical channels, some may be hardcoded to 0 or 1.
- DrmModifier
- Format
- A format descriptor that describes the channels present in a texture or view, how they are laid out, what size they are, and how the elements of the channels are interpreted (integer, float, etc.)
- Surface
Type - Type of the allocated texture surface. It is supposed to only carry information about the number of bits per each channel. The actual types are up to the views to decide and interpret. The actual components are up to the swizzle to define.
Constants§
- BASE_
FORMATS - Conversion table from
Format
toBaseFormat
, excludingUndefined
. - BITS_
ZERO - Format bits configuration with no bits assigned.
- NUM_
FORMATS - Number of formats.
Traits§
- AsFormat
- Conversion trait into
Format
;