[][src]Module gfx_hal::format

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

A1r5g5b5Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

A2b10g10r10Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

A2b10g10r10Snorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

A2b10g10r10Sscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

A2b10g10r10Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

A2b10g10r10Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

A2b10g10r10Uscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

A2r10g10b10Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

A2r10g10b10Snorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

A2r10g10b10Sscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

A2r10g10b10Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

A2r10g10b10Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

A2r10g10b10Uscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Abgr8Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Abgr8Snorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Abgr8Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Abgr8Sscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Abgr8Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Abgr8Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Abgr8Uscaled

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 a COLOR aspect, while D32SfloatS8Uint specifies both a depth and stencil aspect but no color.

Astc4x4Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc4x4Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc5x4Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc5x4Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc5x5Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc5x5Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc6x5Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc6x5Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc6x6Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc6x6Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc8x5Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc8x5Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc8x6Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc8x6Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc8x8Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc8x8Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc10x5Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc10x5Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc10x6Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc10x6Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc10x8Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc10x8Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc10x10Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc10x10Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc12x10Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc12x10Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc12x12Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Astc12x12Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

B5g5r5a1Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

B5g6r5Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

B10g11r11Ufloat

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

BaseFormat

Generic run-time base format.

Bc1RgbSrgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bc1RgbUnorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bc1RgbaSrgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bc1RgbaUnorm

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.

Bc6hSfloat

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bc6hUfloat

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.

Bgr8Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgr8Snorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgr8Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgr8Sscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgr8Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgr8Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgr8Uscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgra4Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgra8Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgra8Snorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgra8Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgra8Sscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgra8Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgra8Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Bgra8Uscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

BufferFeature

Buffer feature flags.

D16Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

D16UnormS8Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

D24UnormS8Uint

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.

D32SfloatS8Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

E5b9g9r9Ufloat

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

EacR11Snorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

EacR11Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

EacR11g11Snorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

EacR11g11Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Etc2R8g8b8Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Etc2R8g8b8Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Etc2R8g8b8a1Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Etc2R8g8b8a1Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Etc2R8g8b8a8Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Etc2R8g8b8a8Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

FormatBits

Description of the bits distribution of a format.

FormatDesc

Description of a format.

ImageFeature

Image feature flags.

Properties

Format properties of the physical device.

R5g5b5a1Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

R5g6b5Unorm

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.

Rg16Sfloat

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rg16Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rg16Snorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rg16Sscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rg16Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rg16Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rg16Uscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rg32Sfloat

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rg32Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rg32Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rg64Sfloat

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rg64Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rg64Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb8Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb8Snorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb8Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb8Sscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb8Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb8Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb8Uscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb16Sfloat

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb16Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb16Snorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb16Sscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb16Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb16Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb16Uscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb32Sfloat

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb32Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb32Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb64Sfloat

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb64Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgb64Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba4Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba8Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba8Snorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba8Srgb

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba8Sscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba8Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba8Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba8Uscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba16Sfloat

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba16Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba16Snorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba16Sscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba16Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba16Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba16Uscaled

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba32Sfloat

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba32Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba32Uint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba64Sfloat

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba64Sint

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Rgba64Uint

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 swap RGBA formats into BGRA formats and back.

X8D24Unorm

A struct equivalent to the matching Format enum member, which allows an API to be strongly typed on particular formats.

Enums

ChannelType

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.

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.)

SurfaceType

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 to BaseFormat, excluding Undefined.

BITS_ZERO

Format bits configuration with no bits assigned.

NUM_FORMATS

Number of formats.

Traits

AsFormat

Conversion trait into Format;