[][src]Module vulkano::format

Declares all the formats of data and images supported by Vulkan.

Content of this module

This module contains three things:

  • The Format enumeration, which contains all the available formats.
  • The FormatDesc trait.
  • One struct for each format.

Formats

List of suffixes:

  • Unorm means that the values are unsigned integers that are converted into floating points. The maximum possible representable value becomes 1.0, and the minimum representable value becomes 0.0. For example the value 255 in a R8Unorm will be interpreted as 1.0.

  • Snorm is the same as Unorm, but the integers are signed and the range is from -1.0 to 1.0 instead.

  • Uscaled means that the values are unsigned integers that are converted into floating points. No change in the value is done. For example the value 255 in a R8Uscaled will be interpreted as 255.0.

  • Sscaled is the same as Uscaled expect that the integers are signed.

  • Uint means that the values are unsigned integers. No conversion is performed.

  • Sint means that the values are signed integers. No conversion is performed.

  • Ufloat means that the values are unsigned floating points. No conversion is performed. This format is very unusual.

  • Sfloat means that the values are regular floating points. No conversion is performed.

  • Srgb is the same as Unorm, except that the value is interpreted as being in the sRGB color space. This means that its value will be converted to fit in the RGB color space when it is read. The fourth channel (usually used for alpha), if present, is not concerned by the conversion.

Choosing a format

The following formats are guaranteed to be supported for everything that is related to texturing (ie. blitting source and sampling them linearly). You should choose one of these formats if you have an image that you are going to sample from:

// TODO: use vulkano enums

  • B4G4R4A4_UNORM_PACK16
  • R5G6B5_UNORM_PACK16
  • A1R5G5B5_UNORM_PACK16
  • R8_UNORM
  • R8_SNORM
  • R8G8_UNORM
  • R8G8_SNORM
  • R8G8B8A8_UNORM
  • R8G8B8A8_SNORM
  • R8G8B8A8_SRGB
  • B8G8R8A8_UNORM
  • B8G8R8A8_SRGB
  • A8B8G8R8_UNORM_PACK32
  • A8B8G8R8_SNORM_PACK32
  • A8B8G8R8_SRGB_PACK32
  • A2B10G10R10_UNORM_PACK32
  • R16_SFLOAT
  • R16G16_SFLOAT
  • R16G16B16A16_SFLOAT
  • B10G11R11_UFLOAT_PACK32
  • E5B9G9R9_UFLOAT_PACK32

The following formats are guaranteed to be supported for everything that is related to intermediate render targets (ie. blitting destination, color attachment and sampling linearly):

// TODO: use vulkano enums

  • R5G6B5_UNORM_PACK16
  • A1R5G5B5_UNORM_PACK16
  • R8_UNORM
  • R8G8_UNORM
  • R8G8B8A8_UNORM
  • R8G8B8A8_SRGB
  • B8G8R8A8_UNORM
  • B8G8R8A8_SRGB
  • A8B8G8R8_UNORM_PACK32
  • A8B8G8R8_SRGB_PACK32
  • A2B10G10R10_UNORM_PACK32
  • R16_SFLOAT
  • R16G16_SFLOAT
  • R16G16B16A16_SFLOAT

For depth images, only D16Unorm is guaranteed to be supported. For depth-stencil images, it is guaranteed that either D24Unorm_S8Uint or D32Sfloat_S8Uint are supported.

// TODO: storage formats

Structs

A1R5G5B5UnormPack16
A2B10G10R10SintPack32
A2B10G10R10SnormPack32
A2B10G10R10SscaledPack32
A2B10G10R10UintPack32
A2B10G10R10UnormPack32
A2B10G10R10UscaledPack32
A2R10G10B10SintPack32
A2R10G10B10SnormPack32
A2R10G10B10SscaledPack32
A2R10G10B10UintPack32
A2R10G10B10UnormPack32
A2R10G10B10UscaledPack32
A8B8G8R8SintPack32
A8B8G8R8SnormPack32
A8B8G8R8SrgbPack32
A8B8G8R8SscaledPack32
A8B8G8R8UintPack32
A8B8G8R8UnormPack32
A8B8G8R8UscaledPack32
ASTC_10x5UnormBlock
ASTC_10x5SrgbBlock
ASTC_10x6UnormBlock
ASTC_10x6SrgbBlock
ASTC_10x8UnormBlock
ASTC_10x8SrgbBlock
ASTC_10x10UnormBlock
ASTC_10x10SrgbBlock
ASTC_12x10UnormBlock
ASTC_12x10SrgbBlock
ASTC_12x12UnormBlock
ASTC_12x12SrgbBlock
ASTC_4x4UnormBlock
ASTC_4x4SrgbBlock
ASTC_5x4UnormBlock
ASTC_5x4SrgbBlock
ASTC_5x5UnormBlock
ASTC_5x5SrgbBlock
ASTC_6x5UnormBlock
ASTC_6x5SrgbBlock
ASTC_6x6UnormBlock
ASTC_6x6SrgbBlock
ASTC_8x5UnormBlock
ASTC_8x5SrgbBlock
ASTC_8x6UnormBlock
ASTC_8x6SrgbBlock
ASTC_8x8UnormBlock
ASTC_8x8SrgbBlock
B10G11R11UfloatPack32
B4G4R4A4UnormPack16
B5G5R5A1UnormPack16
B5G6R5UnormPack16
B8G8R8Unorm
B8G8R8Snorm
B8G8R8Uscaled
B8G8R8Sscaled
B8G8R8Uint
B8G8R8Sint
B8G8R8Srgb
B8G8R8A8Unorm
B8G8R8A8Snorm
B8G8R8A8Uscaled
B8G8R8A8Sscaled
B8G8R8A8Uint
B8G8R8A8Sint
B8G8R8A8Srgb
BC1_RGBUnormBlock
BC1_RGBSrgbBlock
BC1_RGBAUnormBlock
BC1_RGBASrgbBlock
BC2UnormBlock
BC2SrgbBlock
BC3UnormBlock
BC3SrgbBlock
BC4UnormBlock
BC4SnormBlock
BC5UnormBlock
BC5SnormBlock
BC6HUfloatBlock
BC6HSfloatBlock
BC7UnormBlock
BC7SrgbBlock
D16Unorm
D32Sfloat
D16Unorm_S8Uint
D24Unorm_S8Uint
D32Sfloat_S8Uint
E5B9G9R9UfloatPack32
EAC_R11UnormBlock
EAC_R11SnormBlock
EAC_R11G11UnormBlock
EAC_R11G11SnormBlock
ETC2_R8G8B8UnormBlock
ETC2_R8G8B8SrgbBlock
ETC2_R8G8B8A1UnormBlock
ETC2_R8G8B8A1SrgbBlock
ETC2_R8G8B8A8UnormBlock
ETC2_R8G8B8A8SrgbBlock
IncompatiblePixelsType
R8Unorm
R8Snorm
R8Uscaled
R8Sscaled
R8Uint
R8Sint
R8Srgb
R16Unorm
R16Snorm
R16Uscaled
R16Sscaled
R16Uint
R16Sint
R16Sfloat
R32Uint
R32Sint
R32Sfloat
R64Uint
R64Sint
R64Sfloat
R16G16Unorm
R16G16Snorm
R16G16Uscaled
R16G16Sscaled
R16G16Uint
R16G16Sint
R16G16Sfloat
R16G16B16Unorm
R16G16B16Snorm
R16G16B16Uscaled
R16G16B16Sscaled
R16G16B16Uint
R16G16B16Sint
R16G16B16Sfloat
R16G16B16A16Unorm
R16G16B16A16Snorm
R16G16B16A16Uscaled
R16G16B16A16Sscaled
R16G16B16A16Uint
R16G16B16A16Sint
R16G16B16A16Sfloat
R32G32Uint
R32G32Sint
R32G32Sfloat
R32G32B32Uint
R32G32B32Sint
R32G32B32Sfloat
R32G32B32A32Uint
R32G32B32A32Sint
R32G32B32A32Sfloat
R4G4B4A4UnormPack16
R4G4UnormPack8
R5G5B5A1UnormPack16
R5G6B5UnormPack16
R64G64Uint
R64G64Sint
R64G64Sfloat
R64G64B64Uint
R64G64B64Sint
R64G64B64Sfloat
R64G64B64A64Uint
R64G64B64A64Sint
R64G64B64A64Sfloat
R8G8Unorm
R8G8Snorm
R8G8Uscaled
R8G8Sscaled
R8G8Uint
R8G8Sint
R8G8Srgb
R8G8B8Unorm
R8G8B8Snorm
R8G8B8Uscaled
R8G8B8Sscaled
R8G8B8Uint
R8G8B8Sint
R8G8B8Srgb
R8G8B8A8Unorm
R8G8B8A8Snorm
R8G8B8A8Uscaled
R8G8B8A8Sscaled
R8G8B8A8Uint
R8G8B8A8Sint
R8G8B8A8Srgb
S8Uint
X8_D24UnormPack32

Enums

ClearValue

Describes a uniform value that will be used to fill an image.

Format

An enumeration of all the possible formats.

FormatTy

Traits

AcceptsPixels
ClearValuesTuple
Data

Some data whose type must be known by the library.

FormatDesc
PossibleCompressedFormatDesc
PossibleDepthFormatDesc
PossibleDepthStencilFormatDesc
PossibleFloatFormatDesc

Trait for types that can possibly describe a float attachment.

PossibleFloatOrCompressedFormatDesc

Trait for types that can possibly describe a float or compressed attachment.

PossibleSintFormatDesc
PossibleStencilFormatDesc
PossibleUintFormatDesc
StrongStorage