Enum vulkano::format::Format [−][src]
#[repr(i32)]
pub enum Format {
Show 246 variants
R4G4_UNORM_PACK8,
R4G4B4A4_UNORM_PACK16,
B4G4R4A4_UNORM_PACK16,
R5G6B5_UNORM_PACK16,
B5G6R5_UNORM_PACK16,
R5G5B5A1_UNORM_PACK16,
B5G5R5A1_UNORM_PACK16,
A1R5G5B5_UNORM_PACK16,
R8_UNORM,
R8_SNORM,
R8_USCALED,
R8_SSCALED,
R8_UINT,
R8_SINT,
R8_SRGB,
R8G8_UNORM,
R8G8_SNORM,
R8G8_USCALED,
R8G8_SSCALED,
R8G8_UINT,
R8G8_SINT,
R8G8_SRGB,
R8G8B8_UNORM,
R8G8B8_SNORM,
R8G8B8_USCALED,
R8G8B8_SSCALED,
R8G8B8_UINT,
R8G8B8_SINT,
R8G8B8_SRGB,
B8G8R8_UNORM,
B8G8R8_SNORM,
B8G8R8_USCALED,
B8G8R8_SSCALED,
B8G8R8_UINT,
B8G8R8_SINT,
B8G8R8_SRGB,
R8G8B8A8_UNORM,
R8G8B8A8_SNORM,
R8G8B8A8_USCALED,
R8G8B8A8_SSCALED,
R8G8B8A8_UINT,
R8G8B8A8_SINT,
R8G8B8A8_SRGB,
B8G8R8A8_UNORM,
B8G8R8A8_SNORM,
B8G8R8A8_USCALED,
B8G8R8A8_SSCALED,
B8G8R8A8_UINT,
B8G8R8A8_SINT,
B8G8R8A8_SRGB,
A8B8G8R8_UNORM_PACK32,
A8B8G8R8_SNORM_PACK32,
A8B8G8R8_USCALED_PACK32,
A8B8G8R8_SSCALED_PACK32,
A8B8G8R8_UINT_PACK32,
A8B8G8R8_SINT_PACK32,
A8B8G8R8_SRGB_PACK32,
A2R10G10B10_UNORM_PACK32,
A2R10G10B10_SNORM_PACK32,
A2R10G10B10_USCALED_PACK32,
A2R10G10B10_SSCALED_PACK32,
A2R10G10B10_UINT_PACK32,
A2R10G10B10_SINT_PACK32,
A2B10G10R10_UNORM_PACK32,
A2B10G10R10_SNORM_PACK32,
A2B10G10R10_USCALED_PACK32,
A2B10G10R10_SSCALED_PACK32,
A2B10G10R10_UINT_PACK32,
A2B10G10R10_SINT_PACK32,
R16_UNORM,
R16_SNORM,
R16_USCALED,
R16_SSCALED,
R16_UINT,
R16_SINT,
R16_SFLOAT,
R16G16_UNORM,
R16G16_SNORM,
R16G16_USCALED,
R16G16_SSCALED,
R16G16_UINT,
R16G16_SINT,
R16G16_SFLOAT,
R16G16B16_UNORM,
R16G16B16_SNORM,
R16G16B16_USCALED,
R16G16B16_SSCALED,
R16G16B16_UINT,
R16G16B16_SINT,
R16G16B16_SFLOAT,
R16G16B16A16_UNORM,
R16G16B16A16_SNORM,
R16G16B16A16_USCALED,
R16G16B16A16_SSCALED,
R16G16B16A16_UINT,
R16G16B16A16_SINT,
R16G16B16A16_SFLOAT,
R32_UINT,
R32_SINT,
R32_SFLOAT,
R32G32_UINT,
R32G32_SINT,
R32G32_SFLOAT,
R32G32B32_UINT,
R32G32B32_SINT,
R32G32B32_SFLOAT,
R32G32B32A32_UINT,
R32G32B32A32_SINT,
R32G32B32A32_SFLOAT,
R64_UINT,
R64_SINT,
R64_SFLOAT,
R64G64_UINT,
R64G64_SINT,
R64G64_SFLOAT,
R64G64B64_UINT,
R64G64B64_SINT,
R64G64B64_SFLOAT,
R64G64B64A64_UINT,
R64G64B64A64_SINT,
R64G64B64A64_SFLOAT,
B10G11R11_UFLOAT_PACK32,
E5B9G9R9_UFLOAT_PACK32,
D16_UNORM,
X8_D24_UNORM_PACK32,
D32_SFLOAT,
S8_UINT,
D16_UNORM_S8_UINT,
D24_UNORM_S8_UINT,
D32_SFLOAT_S8_UINT,
R10X6_UNORM_PACK16,
R10X6G10X6_UNORM_2PACK16,
R10X6G10X6B10X6A10X6_UNORM_4PACK16,
R12X4_UNORM_PACK16,
R12X4G12X4_UNORM_2PACK16,
R12X4G12X4B12X4A12X4_UNORM_4PACK16,
A4R4G4B4_UNORM_PACK16,
A4B4G4R4_UNORM_PACK16,
BC1_RGB_UNORM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
ASTC_12x10_SRGB_BLOCK,
ASTC_12x12_UNORM_BLOCK,
ASTC_12x12_SRGB_BLOCK,
ASTC_4x4_SFLOAT_BLOCK,
ASTC_5x4_SFLOAT_BLOCK,
ASTC_5x5_SFLOAT_BLOCK,
ASTC_6x5_SFLOAT_BLOCK,
ASTC_6x6_SFLOAT_BLOCK,
ASTC_8x5_SFLOAT_BLOCK,
ASTC_8x6_SFLOAT_BLOCK,
ASTC_8x8_SFLOAT_BLOCK,
ASTC_10x5_SFLOAT_BLOCK,
ASTC_10x6_SFLOAT_BLOCK,
ASTC_10x8_SFLOAT_BLOCK,
ASTC_10x10_SFLOAT_BLOCK,
ASTC_12x10_SFLOAT_BLOCK,
ASTC_12x12_SFLOAT_BLOCK,
PVRTC1_2BPP_UNORM_BLOCK,
PVRTC1_4BPP_UNORM_BLOCK,
PVRTC2_2BPP_UNORM_BLOCK,
PVRTC2_4BPP_UNORM_BLOCK,
PVRTC1_2BPP_SRGB_BLOCK,
PVRTC1_4BPP_SRGB_BLOCK,
PVRTC2_2BPP_SRGB_BLOCK,
PVRTC2_4BPP_SRGB_BLOCK,
G8B8G8R8_422_UNORM,
B8G8R8G8_422_UNORM,
G10X6B10X6G10X6R10X6_422_UNORM_4PACK16,
B10X6G10X6R10X6G10X6_422_UNORM_4PACK16,
G12X4B12X4G12X4R12X4_422_UNORM_4PACK16,
B12X4G12X4R12X4G12X4_422_UNORM_4PACK16,
G16B16G16R16_422_UNORM,
B16G16R16G16_422_UNORM,
G8_B8_R8_3PLANE_420_UNORM,
G8_B8R8_2PLANE_420_UNORM,
G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16,
G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16,
G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16,
G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16,
G16_B16_R16_3PLANE_420_UNORM,
G16_B16R16_2PLANE_420_UNORM,
G8_B8_R8_3PLANE_422_UNORM,
G8_B8R8_2PLANE_422_UNORM,
G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16,
G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16,
G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16,
G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16,
G16_B16_R16_3PLANE_422_UNORM,
G16_B16R16_2PLANE_422_UNORM,
G8_B8_R8_3PLANE_444_UNORM,
G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16,
G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16,
G16_B16_R16_3PLANE_444_UNORM,
G8_B8R8_2PLANE_444_UNORM,
G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16,
G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16,
G16_B16R16_2PLANE_444_UNORM,
}
Expand description
An enumeration of all the possible formats.
Variants
Implementations
Returns the aspects that images of this format have.
Returns the dimensions in texels (horizontally and vertically) of a single texel block of this format. A texel block is a rectangle of pixels that is represented by a single element of this format. It is also the minimum granularity of the size of an image; images must always have a size that’s a multiple of the block size.
For normal formats, the block size is [1, 1], meaning that each element of the format represents one texel. Block-compressed formats encode multiple texels into a single element. The 422 and 420 YCbCr formats have a block size of [2, 1] and [2, 2] respectively, as the red and blue components are shared across multiple texels.
Returns the an opaque object representing the compatibility class of the format. This can be used to determine whether two formats are compatible for the purposes of certain Vulkan operations, such as image copying.
Returns the number of bits per texel block that each component (R, G, B, A) is represented with. Components that are not present in the format have 0 bits.
For depth/stencil formats, the depth component is the first, stencil the second. For multi-planar formats, this is the number of bits across all planes.
For block-compressed formats, the number of bits in individual components is not well-defined, and the return value will is merely binary: 1 indicates a component that is present in the format, 0 indicates one that is absent.
Returns the block compression scheme used for this format, if any. Returns None
if
the format does not use compression.
For multi-planar formats, returns a slice of length 2 or 3, containing the equivalent regular format of each plane.
For non-planar formats, returns the empty slice.
Returns the size in bytes of a single texel block of this format. Returns None
if the texel block size is not well-defined for this format.
For regular formats, this is the size of a single texel, but for more specialized formats this may be the size of multiple texels.
Depth/stencil formats are considered to have an opaque memory representation, and do not have a well-defined size. Multi-planar formats store the color components disjointly in memory, and therefore do not have a well-defined size for all components as a whole. The individual planes do have a well-defined size.
Returns the numeric data type of the color aspect of this format. Returns None
for depth/stencil formats.
Returns the numeric data type of the depth aspect of this format. Returns None
color and stencil-only formats.
Returns the numeric data type of the stencil aspect of this format. Returns None
for color and depth-only formats.
Returns whether sampler YCbCr conversion is required for image views of this format.
Retrieves the properties of a format when used by a certain device.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Format
impl UnwindSafe for Format
Blanket Implementations
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.