aboutsummaryrefslogtreecommitdiff
path: root/out/formats.rs
diff options
context:
space:
mode:
Diffstat (limited to 'out/formats.rs')
-rw-r--r--out/formats.rs4625
1 files changed, 4625 insertions, 0 deletions
diff --git a/out/formats.rs b/out/formats.rs
new file mode 100644
index 0000000..1b0c31c
--- /dev/null
+++ b/out/formats.rs
@@ -0,0 +1,4625 @@
+// This file is auto-generated by vulkano autogen from vk.xml header version 1.3.238.
+// It should not be edited manually. Changes should be made by editing autogen.
+
+#[doc = r" An enumeration of all the possible formats."]
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
+#[repr(i32)]
+#[allow(non_camel_case_types)]
+#[non_exhaustive]
+pub enum Format {
+ R4G4_UNORM_PACK8 = ash::vk::Format::R4G4_UNORM_PACK8.as_raw(),
+ R4G4B4A4_UNORM_PACK16 = ash::vk::Format::R4G4B4A4_UNORM_PACK16.as_raw(),
+ B4G4R4A4_UNORM_PACK16 = ash::vk::Format::B4G4R4A4_UNORM_PACK16.as_raw(),
+ R5G6B5_UNORM_PACK16 = ash::vk::Format::R5G6B5_UNORM_PACK16.as_raw(),
+ B5G6R5_UNORM_PACK16 = ash::vk::Format::B5G6R5_UNORM_PACK16.as_raw(),
+ R5G5B5A1_UNORM_PACK16 = ash::vk::Format::R5G5B5A1_UNORM_PACK16.as_raw(),
+ B5G5R5A1_UNORM_PACK16 = ash::vk::Format::B5G5R5A1_UNORM_PACK16.as_raw(),
+ A1R5G5B5_UNORM_PACK16 = ash::vk::Format::A1R5G5B5_UNORM_PACK16.as_raw(),
+ R8_UNORM = ash::vk::Format::R8_UNORM.as_raw(),
+ R8_SNORM = ash::vk::Format::R8_SNORM.as_raw(),
+ R8_USCALED = ash::vk::Format::R8_USCALED.as_raw(),
+ R8_SSCALED = ash::vk::Format::R8_SSCALED.as_raw(),
+ R8_UINT = ash::vk::Format::R8_UINT.as_raw(),
+ R8_SINT = ash::vk::Format::R8_SINT.as_raw(),
+ R8_SRGB = ash::vk::Format::R8_SRGB.as_raw(),
+ R8G8_UNORM = ash::vk::Format::R8G8_UNORM.as_raw(),
+ R8G8_SNORM = ash::vk::Format::R8G8_SNORM.as_raw(),
+ R8G8_USCALED = ash::vk::Format::R8G8_USCALED.as_raw(),
+ R8G8_SSCALED = ash::vk::Format::R8G8_SSCALED.as_raw(),
+ R8G8_UINT = ash::vk::Format::R8G8_UINT.as_raw(),
+ R8G8_SINT = ash::vk::Format::R8G8_SINT.as_raw(),
+ R8G8_SRGB = ash::vk::Format::R8G8_SRGB.as_raw(),
+ R8G8B8_UNORM = ash::vk::Format::R8G8B8_UNORM.as_raw(),
+ R8G8B8_SNORM = ash::vk::Format::R8G8B8_SNORM.as_raw(),
+ R8G8B8_USCALED = ash::vk::Format::R8G8B8_USCALED.as_raw(),
+ R8G8B8_SSCALED = ash::vk::Format::R8G8B8_SSCALED.as_raw(),
+ R8G8B8_UINT = ash::vk::Format::R8G8B8_UINT.as_raw(),
+ R8G8B8_SINT = ash::vk::Format::R8G8B8_SINT.as_raw(),
+ R8G8B8_SRGB = ash::vk::Format::R8G8B8_SRGB.as_raw(),
+ B8G8R8_UNORM = ash::vk::Format::B8G8R8_UNORM.as_raw(),
+ B8G8R8_SNORM = ash::vk::Format::B8G8R8_SNORM.as_raw(),
+ B8G8R8_USCALED = ash::vk::Format::B8G8R8_USCALED.as_raw(),
+ B8G8R8_SSCALED = ash::vk::Format::B8G8R8_SSCALED.as_raw(),
+ B8G8R8_UINT = ash::vk::Format::B8G8R8_UINT.as_raw(),
+ B8G8R8_SINT = ash::vk::Format::B8G8R8_SINT.as_raw(),
+ B8G8R8_SRGB = ash::vk::Format::B8G8R8_SRGB.as_raw(),
+ R8G8B8A8_UNORM = ash::vk::Format::R8G8B8A8_UNORM.as_raw(),
+ R8G8B8A8_SNORM = ash::vk::Format::R8G8B8A8_SNORM.as_raw(),
+ R8G8B8A8_USCALED = ash::vk::Format::R8G8B8A8_USCALED.as_raw(),
+ R8G8B8A8_SSCALED = ash::vk::Format::R8G8B8A8_SSCALED.as_raw(),
+ R8G8B8A8_UINT = ash::vk::Format::R8G8B8A8_UINT.as_raw(),
+ R8G8B8A8_SINT = ash::vk::Format::R8G8B8A8_SINT.as_raw(),
+ R8G8B8A8_SRGB = ash::vk::Format::R8G8B8A8_SRGB.as_raw(),
+ B8G8R8A8_UNORM = ash::vk::Format::B8G8R8A8_UNORM.as_raw(),
+ B8G8R8A8_SNORM = ash::vk::Format::B8G8R8A8_SNORM.as_raw(),
+ B8G8R8A8_USCALED = ash::vk::Format::B8G8R8A8_USCALED.as_raw(),
+ B8G8R8A8_SSCALED = ash::vk::Format::B8G8R8A8_SSCALED.as_raw(),
+ B8G8R8A8_UINT = ash::vk::Format::B8G8R8A8_UINT.as_raw(),
+ B8G8R8A8_SINT = ash::vk::Format::B8G8R8A8_SINT.as_raw(),
+ B8G8R8A8_SRGB = ash::vk::Format::B8G8R8A8_SRGB.as_raw(),
+ A8B8G8R8_UNORM_PACK32 = ash::vk::Format::A8B8G8R8_UNORM_PACK32.as_raw(),
+ A8B8G8R8_SNORM_PACK32 = ash::vk::Format::A8B8G8R8_SNORM_PACK32.as_raw(),
+ A8B8G8R8_USCALED_PACK32 = ash::vk::Format::A8B8G8R8_USCALED_PACK32.as_raw(),
+ A8B8G8R8_SSCALED_PACK32 = ash::vk::Format::A8B8G8R8_SSCALED_PACK32.as_raw(),
+ A8B8G8R8_UINT_PACK32 = ash::vk::Format::A8B8G8R8_UINT_PACK32.as_raw(),
+ A8B8G8R8_SINT_PACK32 = ash::vk::Format::A8B8G8R8_SINT_PACK32.as_raw(),
+ A8B8G8R8_SRGB_PACK32 = ash::vk::Format::A8B8G8R8_SRGB_PACK32.as_raw(),
+ A2R10G10B10_UNORM_PACK32 = ash::vk::Format::A2R10G10B10_UNORM_PACK32.as_raw(),
+ A2R10G10B10_SNORM_PACK32 = ash::vk::Format::A2R10G10B10_SNORM_PACK32.as_raw(),
+ A2R10G10B10_USCALED_PACK32 = ash::vk::Format::A2R10G10B10_USCALED_PACK32.as_raw(),
+ A2R10G10B10_SSCALED_PACK32 = ash::vk::Format::A2R10G10B10_SSCALED_PACK32.as_raw(),
+ A2R10G10B10_UINT_PACK32 = ash::vk::Format::A2R10G10B10_UINT_PACK32.as_raw(),
+ A2R10G10B10_SINT_PACK32 = ash::vk::Format::A2R10G10B10_SINT_PACK32.as_raw(),
+ A2B10G10R10_UNORM_PACK32 = ash::vk::Format::A2B10G10R10_UNORM_PACK32.as_raw(),
+ A2B10G10R10_SNORM_PACK32 = ash::vk::Format::A2B10G10R10_SNORM_PACK32.as_raw(),
+ A2B10G10R10_USCALED_PACK32 = ash::vk::Format::A2B10G10R10_USCALED_PACK32.as_raw(),
+ A2B10G10R10_SSCALED_PACK32 = ash::vk::Format::A2B10G10R10_SSCALED_PACK32.as_raw(),
+ A2B10G10R10_UINT_PACK32 = ash::vk::Format::A2B10G10R10_UINT_PACK32.as_raw(),
+ A2B10G10R10_SINT_PACK32 = ash::vk::Format::A2B10G10R10_SINT_PACK32.as_raw(),
+ R16_UNORM = ash::vk::Format::R16_UNORM.as_raw(),
+ R16_SNORM = ash::vk::Format::R16_SNORM.as_raw(),
+ R16_USCALED = ash::vk::Format::R16_USCALED.as_raw(),
+ R16_SSCALED = ash::vk::Format::R16_SSCALED.as_raw(),
+ R16_UINT = ash::vk::Format::R16_UINT.as_raw(),
+ R16_SINT = ash::vk::Format::R16_SINT.as_raw(),
+ R16_SFLOAT = ash::vk::Format::R16_SFLOAT.as_raw(),
+ R16G16_UNORM = ash::vk::Format::R16G16_UNORM.as_raw(),
+ R16G16_SNORM = ash::vk::Format::R16G16_SNORM.as_raw(),
+ R16G16_USCALED = ash::vk::Format::R16G16_USCALED.as_raw(),
+ R16G16_SSCALED = ash::vk::Format::R16G16_SSCALED.as_raw(),
+ R16G16_UINT = ash::vk::Format::R16G16_UINT.as_raw(),
+ R16G16_SINT = ash::vk::Format::R16G16_SINT.as_raw(),
+ R16G16_SFLOAT = ash::vk::Format::R16G16_SFLOAT.as_raw(),
+ R16G16B16_UNORM = ash::vk::Format::R16G16B16_UNORM.as_raw(),
+ R16G16B16_SNORM = ash::vk::Format::R16G16B16_SNORM.as_raw(),
+ R16G16B16_USCALED = ash::vk::Format::R16G16B16_USCALED.as_raw(),
+ R16G16B16_SSCALED = ash::vk::Format::R16G16B16_SSCALED.as_raw(),
+ R16G16B16_UINT = ash::vk::Format::R16G16B16_UINT.as_raw(),
+ R16G16B16_SINT = ash::vk::Format::R16G16B16_SINT.as_raw(),
+ R16G16B16_SFLOAT = ash::vk::Format::R16G16B16_SFLOAT.as_raw(),
+ R16G16B16A16_UNORM = ash::vk::Format::R16G16B16A16_UNORM.as_raw(),
+ R16G16B16A16_SNORM = ash::vk::Format::R16G16B16A16_SNORM.as_raw(),
+ R16G16B16A16_USCALED = ash::vk::Format::R16G16B16A16_USCALED.as_raw(),
+ R16G16B16A16_SSCALED = ash::vk::Format::R16G16B16A16_SSCALED.as_raw(),
+ R16G16B16A16_UINT = ash::vk::Format::R16G16B16A16_UINT.as_raw(),
+ R16G16B16A16_SINT = ash::vk::Format::R16G16B16A16_SINT.as_raw(),
+ R16G16B16A16_SFLOAT = ash::vk::Format::R16G16B16A16_SFLOAT.as_raw(),
+ R32_UINT = ash::vk::Format::R32_UINT.as_raw(),
+ R32_SINT = ash::vk::Format::R32_SINT.as_raw(),
+ R32_SFLOAT = ash::vk::Format::R32_SFLOAT.as_raw(),
+ R32G32_UINT = ash::vk::Format::R32G32_UINT.as_raw(),
+ R32G32_SINT = ash::vk::Format::R32G32_SINT.as_raw(),
+ R32G32_SFLOAT = ash::vk::Format::R32G32_SFLOAT.as_raw(),
+ R32G32B32_UINT = ash::vk::Format::R32G32B32_UINT.as_raw(),
+ R32G32B32_SINT = ash::vk::Format::R32G32B32_SINT.as_raw(),
+ R32G32B32_SFLOAT = ash::vk::Format::R32G32B32_SFLOAT.as_raw(),
+ R32G32B32A32_UINT = ash::vk::Format::R32G32B32A32_UINT.as_raw(),
+ R32G32B32A32_SINT = ash::vk::Format::R32G32B32A32_SINT.as_raw(),
+ R32G32B32A32_SFLOAT = ash::vk::Format::R32G32B32A32_SFLOAT.as_raw(),
+ R64_UINT = ash::vk::Format::R64_UINT.as_raw(),
+ R64_SINT = ash::vk::Format::R64_SINT.as_raw(),
+ R64_SFLOAT = ash::vk::Format::R64_SFLOAT.as_raw(),
+ R64G64_UINT = ash::vk::Format::R64G64_UINT.as_raw(),
+ R64G64_SINT = ash::vk::Format::R64G64_SINT.as_raw(),
+ R64G64_SFLOAT = ash::vk::Format::R64G64_SFLOAT.as_raw(),
+ R64G64B64_UINT = ash::vk::Format::R64G64B64_UINT.as_raw(),
+ R64G64B64_SINT = ash::vk::Format::R64G64B64_SINT.as_raw(),
+ R64G64B64_SFLOAT = ash::vk::Format::R64G64B64_SFLOAT.as_raw(),
+ R64G64B64A64_UINT = ash::vk::Format::R64G64B64A64_UINT.as_raw(),
+ R64G64B64A64_SINT = ash::vk::Format::R64G64B64A64_SINT.as_raw(),
+ R64G64B64A64_SFLOAT = ash::vk::Format::R64G64B64A64_SFLOAT.as_raw(),
+ B10G11R11_UFLOAT_PACK32 = ash::vk::Format::B10G11R11_UFLOAT_PACK32.as_raw(),
+ E5B9G9R9_UFLOAT_PACK32 = ash::vk::Format::E5B9G9R9_UFLOAT_PACK32.as_raw(),
+ D16_UNORM = ash::vk::Format::D16_UNORM.as_raw(),
+ X8_D24_UNORM_PACK32 = ash::vk::Format::X8_D24_UNORM_PACK32.as_raw(),
+ D32_SFLOAT = ash::vk::Format::D32_SFLOAT.as_raw(),
+ S8_UINT = ash::vk::Format::S8_UINT.as_raw(),
+ D16_UNORM_S8_UINT = ash::vk::Format::D16_UNORM_S8_UINT.as_raw(),
+ D24_UNORM_S8_UINT = ash::vk::Format::D24_UNORM_S8_UINT.as_raw(),
+ D32_SFLOAT_S8_UINT = ash::vk::Format::D32_SFLOAT_S8_UINT.as_raw(),
+ BC1_RGB_UNORM_BLOCK = ash::vk::Format::BC1_RGB_UNORM_BLOCK.as_raw(),
+ BC1_RGB_SRGB_BLOCK = ash::vk::Format::BC1_RGB_SRGB_BLOCK.as_raw(),
+ BC1_RGBA_UNORM_BLOCK = ash::vk::Format::BC1_RGBA_UNORM_BLOCK.as_raw(),
+ BC1_RGBA_SRGB_BLOCK = ash::vk::Format::BC1_RGBA_SRGB_BLOCK.as_raw(),
+ BC2_UNORM_BLOCK = ash::vk::Format::BC2_UNORM_BLOCK.as_raw(),
+ BC2_SRGB_BLOCK = ash::vk::Format::BC2_SRGB_BLOCK.as_raw(),
+ BC3_UNORM_BLOCK = ash::vk::Format::BC3_UNORM_BLOCK.as_raw(),
+ BC3_SRGB_BLOCK = ash::vk::Format::BC3_SRGB_BLOCK.as_raw(),
+ BC4_UNORM_BLOCK = ash::vk::Format::BC4_UNORM_BLOCK.as_raw(),
+ BC4_SNORM_BLOCK = ash::vk::Format::BC4_SNORM_BLOCK.as_raw(),
+ BC5_UNORM_BLOCK = ash::vk::Format::BC5_UNORM_BLOCK.as_raw(),
+ BC5_SNORM_BLOCK = ash::vk::Format::BC5_SNORM_BLOCK.as_raw(),
+ BC6H_UFLOAT_BLOCK = ash::vk::Format::BC6H_UFLOAT_BLOCK.as_raw(),
+ BC6H_SFLOAT_BLOCK = ash::vk::Format::BC6H_SFLOAT_BLOCK.as_raw(),
+ BC7_UNORM_BLOCK = ash::vk::Format::BC7_UNORM_BLOCK.as_raw(),
+ BC7_SRGB_BLOCK = ash::vk::Format::BC7_SRGB_BLOCK.as_raw(),
+ ETC2_R8G8B8_UNORM_BLOCK = ash::vk::Format::ETC2_R8G8B8_UNORM_BLOCK.as_raw(),
+ ETC2_R8G8B8_SRGB_BLOCK = ash::vk::Format::ETC2_R8G8B8_SRGB_BLOCK.as_raw(),
+ ETC2_R8G8B8A1_UNORM_BLOCK = ash::vk::Format::ETC2_R8G8B8A1_UNORM_BLOCK.as_raw(),
+ ETC2_R8G8B8A1_SRGB_BLOCK = ash::vk::Format::ETC2_R8G8B8A1_SRGB_BLOCK.as_raw(),
+ ETC2_R8G8B8A8_UNORM_BLOCK = ash::vk::Format::ETC2_R8G8B8A8_UNORM_BLOCK.as_raw(),
+ ETC2_R8G8B8A8_SRGB_BLOCK = ash::vk::Format::ETC2_R8G8B8A8_SRGB_BLOCK.as_raw(),
+ EAC_R11_UNORM_BLOCK = ash::vk::Format::EAC_R11_UNORM_BLOCK.as_raw(),
+ EAC_R11_SNORM_BLOCK = ash::vk::Format::EAC_R11_SNORM_BLOCK.as_raw(),
+ EAC_R11G11_UNORM_BLOCK = ash::vk::Format::EAC_R11G11_UNORM_BLOCK.as_raw(),
+ EAC_R11G11_SNORM_BLOCK = ash::vk::Format::EAC_R11G11_SNORM_BLOCK.as_raw(),
+ ASTC_4x4_UNORM_BLOCK = ash::vk::Format::ASTC_4X4_UNORM_BLOCK.as_raw(),
+ ASTC_4x4_SRGB_BLOCK = ash::vk::Format::ASTC_4X4_SRGB_BLOCK.as_raw(),
+ ASTC_5x4_UNORM_BLOCK = ash::vk::Format::ASTC_5X4_UNORM_BLOCK.as_raw(),
+ ASTC_5x4_SRGB_BLOCK = ash::vk::Format::ASTC_5X4_SRGB_BLOCK.as_raw(),
+ ASTC_5x5_UNORM_BLOCK = ash::vk::Format::ASTC_5X5_UNORM_BLOCK.as_raw(),
+ ASTC_5x5_SRGB_BLOCK = ash::vk::Format::ASTC_5X5_SRGB_BLOCK.as_raw(),
+ ASTC_6x5_UNORM_BLOCK = ash::vk::Format::ASTC_6X5_UNORM_BLOCK.as_raw(),
+ ASTC_6x5_SRGB_BLOCK = ash::vk::Format::ASTC_6X5_SRGB_BLOCK.as_raw(),
+ ASTC_6x6_UNORM_BLOCK = ash::vk::Format::ASTC_6X6_UNORM_BLOCK.as_raw(),
+ ASTC_6x6_SRGB_BLOCK = ash::vk::Format::ASTC_6X6_SRGB_BLOCK.as_raw(),
+ ASTC_8x5_UNORM_BLOCK = ash::vk::Format::ASTC_8X5_UNORM_BLOCK.as_raw(),
+ ASTC_8x5_SRGB_BLOCK = ash::vk::Format::ASTC_8X5_SRGB_BLOCK.as_raw(),
+ ASTC_8x6_UNORM_BLOCK = ash::vk::Format::ASTC_8X6_UNORM_BLOCK.as_raw(),
+ ASTC_8x6_SRGB_BLOCK = ash::vk::Format::ASTC_8X6_SRGB_BLOCK.as_raw(),
+ ASTC_8x8_UNORM_BLOCK = ash::vk::Format::ASTC_8X8_UNORM_BLOCK.as_raw(),
+ ASTC_8x8_SRGB_BLOCK = ash::vk::Format::ASTC_8X8_SRGB_BLOCK.as_raw(),
+ ASTC_10x5_UNORM_BLOCK = ash::vk::Format::ASTC_10X5_UNORM_BLOCK.as_raw(),
+ ASTC_10x5_SRGB_BLOCK = ash::vk::Format::ASTC_10X5_SRGB_BLOCK.as_raw(),
+ ASTC_10x6_UNORM_BLOCK = ash::vk::Format::ASTC_10X6_UNORM_BLOCK.as_raw(),
+ ASTC_10x6_SRGB_BLOCK = ash::vk::Format::ASTC_10X6_SRGB_BLOCK.as_raw(),
+ ASTC_10x8_UNORM_BLOCK = ash::vk::Format::ASTC_10X8_UNORM_BLOCK.as_raw(),
+ ASTC_10x8_SRGB_BLOCK = ash::vk::Format::ASTC_10X8_SRGB_BLOCK.as_raw(),
+ ASTC_10x10_UNORM_BLOCK = ash::vk::Format::ASTC_10X10_UNORM_BLOCK.as_raw(),
+ ASTC_10x10_SRGB_BLOCK = ash::vk::Format::ASTC_10X10_SRGB_BLOCK.as_raw(),
+ ASTC_12x10_UNORM_BLOCK = ash::vk::Format::ASTC_12X10_UNORM_BLOCK.as_raw(),
+ ASTC_12x10_SRGB_BLOCK = ash::vk::Format::ASTC_12X10_SRGB_BLOCK.as_raw(),
+ ASTC_12x12_UNORM_BLOCK = ash::vk::Format::ASTC_12X12_UNORM_BLOCK.as_raw(),
+ ASTC_12x12_SRGB_BLOCK = ash::vk::Format::ASTC_12X12_SRGB_BLOCK.as_raw(),
+ G8B8G8R8_422_UNORM = ash::vk::Format::G8B8G8R8_422_UNORM.as_raw(),
+ B8G8R8G8_422_UNORM = ash::vk::Format::B8G8R8G8_422_UNORM.as_raw(),
+ G8_B8_R8_3PLANE_420_UNORM = ash::vk::Format::G8_B8_R8_3PLANE_420_UNORM.as_raw(),
+ G8_B8R8_2PLANE_420_UNORM = ash::vk::Format::G8_B8R8_2PLANE_420_UNORM.as_raw(),
+ G8_B8_R8_3PLANE_422_UNORM = ash::vk::Format::G8_B8_R8_3PLANE_422_UNORM.as_raw(),
+ G8_B8R8_2PLANE_422_UNORM = ash::vk::Format::G8_B8R8_2PLANE_422_UNORM.as_raw(),
+ G8_B8_R8_3PLANE_444_UNORM = ash::vk::Format::G8_B8_R8_3PLANE_444_UNORM.as_raw(),
+ R10X6_UNORM_PACK16 = ash::vk::Format::R10X6_UNORM_PACK16.as_raw(),
+ R10X6G10X6_UNORM_2PACK16 = ash::vk::Format::R10X6G10X6_UNORM_2PACK16.as_raw(),
+ R10X6G10X6B10X6A10X6_UNORM_4PACK16 =
+ ash::vk::Format::R10X6G10X6B10X6A10X6_UNORM_4PACK16.as_raw(),
+ G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 =
+ ash::vk::Format::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16.as_raw(),
+ B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 =
+ ash::vk::Format::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16.as_raw(),
+ G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 =
+ ash::vk::Format::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16.as_raw(),
+ G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 =
+ ash::vk::Format::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16.as_raw(),
+ G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 =
+ ash::vk::Format::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16.as_raw(),
+ G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 =
+ ash::vk::Format::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16.as_raw(),
+ G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 =
+ ash::vk::Format::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16.as_raw(),
+ R12X4_UNORM_PACK16 = ash::vk::Format::R12X4_UNORM_PACK16.as_raw(),
+ R12X4G12X4_UNORM_2PACK16 = ash::vk::Format::R12X4G12X4_UNORM_2PACK16.as_raw(),
+ R12X4G12X4B12X4A12X4_UNORM_4PACK16 =
+ ash::vk::Format::R12X4G12X4B12X4A12X4_UNORM_4PACK16.as_raw(),
+ G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 =
+ ash::vk::Format::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16.as_raw(),
+ B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 =
+ ash::vk::Format::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16.as_raw(),
+ G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 =
+ ash::vk::Format::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16.as_raw(),
+ G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 =
+ ash::vk::Format::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16.as_raw(),
+ G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 =
+ ash::vk::Format::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16.as_raw(),
+ G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 =
+ ash::vk::Format::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16.as_raw(),
+ G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 =
+ ash::vk::Format::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16.as_raw(),
+ G16B16G16R16_422_UNORM = ash::vk::Format::G16B16G16R16_422_UNORM.as_raw(),
+ B16G16R16G16_422_UNORM = ash::vk::Format::B16G16R16G16_422_UNORM.as_raw(),
+ G16_B16_R16_3PLANE_420_UNORM = ash::vk::Format::G16_B16_R16_3PLANE_420_UNORM.as_raw(),
+ G16_B16R16_2PLANE_420_UNORM = ash::vk::Format::G16_B16R16_2PLANE_420_UNORM.as_raw(),
+ G16_B16_R16_3PLANE_422_UNORM = ash::vk::Format::G16_B16_R16_3PLANE_422_UNORM.as_raw(),
+ G16_B16R16_2PLANE_422_UNORM = ash::vk::Format::G16_B16R16_2PLANE_422_UNORM.as_raw(),
+ G16_B16_R16_3PLANE_444_UNORM = ash::vk::Format::G16_B16_R16_3PLANE_444_UNORM.as_raw(),
+ PVRTC1_2BPP_UNORM_BLOCK = ash::vk::Format::PVRTC1_2BPP_UNORM_BLOCK_IMG.as_raw(),
+ PVRTC1_4BPP_UNORM_BLOCK = ash::vk::Format::PVRTC1_4BPP_UNORM_BLOCK_IMG.as_raw(),
+ PVRTC2_2BPP_UNORM_BLOCK = ash::vk::Format::PVRTC2_2BPP_UNORM_BLOCK_IMG.as_raw(),
+ PVRTC2_4BPP_UNORM_BLOCK = ash::vk::Format::PVRTC2_4BPP_UNORM_BLOCK_IMG.as_raw(),
+ PVRTC1_2BPP_SRGB_BLOCK = ash::vk::Format::PVRTC1_2BPP_SRGB_BLOCK_IMG.as_raw(),
+ PVRTC1_4BPP_SRGB_BLOCK = ash::vk::Format::PVRTC1_4BPP_SRGB_BLOCK_IMG.as_raw(),
+ PVRTC2_2BPP_SRGB_BLOCK = ash::vk::Format::PVRTC2_2BPP_SRGB_BLOCK_IMG.as_raw(),
+ PVRTC2_4BPP_SRGB_BLOCK = ash::vk::Format::PVRTC2_4BPP_SRGB_BLOCK_IMG.as_raw(),
+ ASTC_4x4_SFLOAT_BLOCK = ash::vk::Format::ASTC_4X4_SFLOAT_BLOCK.as_raw(),
+ ASTC_5x4_SFLOAT_BLOCK = ash::vk::Format::ASTC_5X4_SFLOAT_BLOCK.as_raw(),
+ ASTC_5x5_SFLOAT_BLOCK = ash::vk::Format::ASTC_5X5_SFLOAT_BLOCK.as_raw(),
+ ASTC_6x5_SFLOAT_BLOCK = ash::vk::Format::ASTC_6X5_SFLOAT_BLOCK.as_raw(),
+ ASTC_6x6_SFLOAT_BLOCK = ash::vk::Format::ASTC_6X6_SFLOAT_BLOCK.as_raw(),
+ ASTC_8x5_SFLOAT_BLOCK = ash::vk::Format::ASTC_8X5_SFLOAT_BLOCK.as_raw(),
+ ASTC_8x6_SFLOAT_BLOCK = ash::vk::Format::ASTC_8X6_SFLOAT_BLOCK.as_raw(),
+ ASTC_8x8_SFLOAT_BLOCK = ash::vk::Format::ASTC_8X8_SFLOAT_BLOCK.as_raw(),
+ ASTC_10x5_SFLOAT_BLOCK = ash::vk::Format::ASTC_10X5_SFLOAT_BLOCK.as_raw(),
+ ASTC_10x6_SFLOAT_BLOCK = ash::vk::Format::ASTC_10X6_SFLOAT_BLOCK.as_raw(),
+ ASTC_10x8_SFLOAT_BLOCK = ash::vk::Format::ASTC_10X8_SFLOAT_BLOCK.as_raw(),
+ ASTC_10x10_SFLOAT_BLOCK = ash::vk::Format::ASTC_10X10_SFLOAT_BLOCK.as_raw(),
+ ASTC_12x10_SFLOAT_BLOCK = ash::vk::Format::ASTC_12X10_SFLOAT_BLOCK.as_raw(),
+ ASTC_12x12_SFLOAT_BLOCK = ash::vk::Format::ASTC_12X12_SFLOAT_BLOCK.as_raw(),
+ G8_B8R8_2PLANE_444_UNORM = ash::vk::Format::G8_B8R8_2PLANE_444_UNORM.as_raw(),
+ G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 =
+ ash::vk::Format::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16.as_raw(),
+ G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 =
+ ash::vk::Format::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16.as_raw(),
+ G16_B16R16_2PLANE_444_UNORM = ash::vk::Format::G16_B16R16_2PLANE_444_UNORM.as_raw(),
+ A4R4G4B4_UNORM_PACK16 = ash::vk::Format::A4R4G4B4_UNORM_PACK16.as_raw(),
+ A4B4G4R4_UNORM_PACK16 = ash::vk::Format::A4B4G4R4_UNORM_PACK16.as_raw(),
+ R16G16_S10_5_NV = ash::vk::Format::R16G16_S10_5_NV.as_raw(),
+}
+impl Format {
+ #[doc = r" Returns the aspects that images of this format have."]
+ pub fn aspects(self) -> ImageAspects {
+ match self {
+ Self::R4G4_UNORM_PACK8 => crate::image::ImageAspects::COLOR,
+ Self::R4G4B4A4_UNORM_PACK16 => crate::image::ImageAspects::COLOR,
+ Self::B4G4R4A4_UNORM_PACK16 => crate::image::ImageAspects::COLOR,
+ Self::R5G6B5_UNORM_PACK16 => crate::image::ImageAspects::COLOR,
+ Self::B5G6R5_UNORM_PACK16 => crate::image::ImageAspects::COLOR,
+ Self::R5G5B5A1_UNORM_PACK16 => crate::image::ImageAspects::COLOR,
+ Self::B5G5R5A1_UNORM_PACK16 => crate::image::ImageAspects::COLOR,
+ Self::A1R5G5B5_UNORM_PACK16 => crate::image::ImageAspects::COLOR,
+ Self::R8_UNORM => crate::image::ImageAspects::COLOR,
+ Self::R8_SNORM => crate::image::ImageAspects::COLOR,
+ Self::R8_USCALED => crate::image::ImageAspects::COLOR,
+ Self::R8_SSCALED => crate::image::ImageAspects::COLOR,
+ Self::R8_UINT => crate::image::ImageAspects::COLOR,
+ Self::R8_SINT => crate::image::ImageAspects::COLOR,
+ Self::R8_SRGB => crate::image::ImageAspects::COLOR,
+ Self::R8G8_UNORM => crate::image::ImageAspects::COLOR,
+ Self::R8G8_SNORM => crate::image::ImageAspects::COLOR,
+ Self::R8G8_USCALED => crate::image::ImageAspects::COLOR,
+ Self::R8G8_SSCALED => crate::image::ImageAspects::COLOR,
+ Self::R8G8_UINT => crate::image::ImageAspects::COLOR,
+ Self::R8G8_SINT => crate::image::ImageAspects::COLOR,
+ Self::R8G8_SRGB => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8_UNORM => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8_SNORM => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8_USCALED => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8_SSCALED => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8_UINT => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8_SINT => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8_SRGB => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8_UNORM => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8_SNORM => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8_USCALED => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8_SSCALED => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8_UINT => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8_SINT => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8_SRGB => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8A8_UNORM => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8A8_SNORM => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8A8_USCALED => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8A8_SSCALED => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8A8_UINT => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8A8_SINT => crate::image::ImageAspects::COLOR,
+ Self::R8G8B8A8_SRGB => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8A8_UNORM => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8A8_SNORM => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8A8_USCALED => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8A8_SSCALED => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8A8_UINT => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8A8_SINT => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8A8_SRGB => crate::image::ImageAspects::COLOR,
+ Self::A8B8G8R8_UNORM_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A8B8G8R8_SNORM_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A8B8G8R8_USCALED_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A8B8G8R8_SSCALED_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A8B8G8R8_UINT_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A8B8G8R8_SINT_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A8B8G8R8_SRGB_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A2R10G10B10_UNORM_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A2R10G10B10_SNORM_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A2R10G10B10_USCALED_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A2R10G10B10_SSCALED_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A2R10G10B10_UINT_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A2R10G10B10_SINT_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A2B10G10R10_UNORM_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A2B10G10R10_SNORM_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A2B10G10R10_USCALED_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A2B10G10R10_SSCALED_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A2B10G10R10_UINT_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::A2B10G10R10_SINT_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::R16_UNORM => crate::image::ImageAspects::COLOR,
+ Self::R16_SNORM => crate::image::ImageAspects::COLOR,
+ Self::R16_USCALED => crate::image::ImageAspects::COLOR,
+ Self::R16_SSCALED => crate::image::ImageAspects::COLOR,
+ Self::R16_UINT => crate::image::ImageAspects::COLOR,
+ Self::R16_SINT => crate::image::ImageAspects::COLOR,
+ Self::R16_SFLOAT => crate::image::ImageAspects::COLOR,
+ Self::R16G16_UNORM => crate::image::ImageAspects::COLOR,
+ Self::R16G16_SNORM => crate::image::ImageAspects::COLOR,
+ Self::R16G16_USCALED => crate::image::ImageAspects::COLOR,
+ Self::R16G16_SSCALED => crate::image::ImageAspects::COLOR,
+ Self::R16G16_UINT => crate::image::ImageAspects::COLOR,
+ Self::R16G16_SINT => crate::image::ImageAspects::COLOR,
+ Self::R16G16_SFLOAT => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16_UNORM => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16_SNORM => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16_USCALED => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16_SSCALED => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16_UINT => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16_SINT => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16_SFLOAT => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16A16_UNORM => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16A16_SNORM => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16A16_USCALED => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16A16_SSCALED => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16A16_UINT => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16A16_SINT => crate::image::ImageAspects::COLOR,
+ Self::R16G16B16A16_SFLOAT => crate::image::ImageAspects::COLOR,
+ Self::R32_UINT => crate::image::ImageAspects::COLOR,
+ Self::R32_SINT => crate::image::ImageAspects::COLOR,
+ Self::R32_SFLOAT => crate::image::ImageAspects::COLOR,
+ Self::R32G32_UINT => crate::image::ImageAspects::COLOR,
+ Self::R32G32_SINT => crate::image::ImageAspects::COLOR,
+ Self::R32G32_SFLOAT => crate::image::ImageAspects::COLOR,
+ Self::R32G32B32_UINT => crate::image::ImageAspects::COLOR,
+ Self::R32G32B32_SINT => crate::image::ImageAspects::COLOR,
+ Self::R32G32B32_SFLOAT => crate::image::ImageAspects::COLOR,
+ Self::R32G32B32A32_UINT => crate::image::ImageAspects::COLOR,
+ Self::R32G32B32A32_SINT => crate::image::ImageAspects::COLOR,
+ Self::R32G32B32A32_SFLOAT => crate::image::ImageAspects::COLOR,
+ Self::R64_UINT => crate::image::ImageAspects::COLOR,
+ Self::R64_SINT => crate::image::ImageAspects::COLOR,
+ Self::R64_SFLOAT => crate::image::ImageAspects::COLOR,
+ Self::R64G64_UINT => crate::image::ImageAspects::COLOR,
+ Self::R64G64_SINT => crate::image::ImageAspects::COLOR,
+ Self::R64G64_SFLOAT => crate::image::ImageAspects::COLOR,
+ Self::R64G64B64_UINT => crate::image::ImageAspects::COLOR,
+ Self::R64G64B64_SINT => crate::image::ImageAspects::COLOR,
+ Self::R64G64B64_SFLOAT => crate::image::ImageAspects::COLOR,
+ Self::R64G64B64A64_UINT => crate::image::ImageAspects::COLOR,
+ Self::R64G64B64A64_SINT => crate::image::ImageAspects::COLOR,
+ Self::R64G64B64A64_SFLOAT => crate::image::ImageAspects::COLOR,
+ Self::B10G11R11_UFLOAT_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::E5B9G9R9_UFLOAT_PACK32 => crate::image::ImageAspects::COLOR,
+ Self::D16_UNORM => crate::image::ImageAspects::DEPTH,
+ Self::X8_D24_UNORM_PACK32 => crate::image::ImageAspects::DEPTH,
+ Self::D32_SFLOAT => crate::image::ImageAspects::DEPTH,
+ Self::S8_UINT => crate::image::ImageAspects::STENCIL,
+ Self::D16_UNORM_S8_UINT => {
+ crate::image::ImageAspects::DEPTH | crate::image::ImageAspects::STENCIL
+ }
+ Self::D24_UNORM_S8_UINT => {
+ crate::image::ImageAspects::DEPTH | crate::image::ImageAspects::STENCIL
+ }
+ Self::D32_SFLOAT_S8_UINT => {
+ crate::image::ImageAspects::DEPTH | crate::image::ImageAspects::STENCIL
+ }
+ Self::BC1_RGB_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC1_RGB_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC1_RGBA_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC1_RGBA_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC2_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC2_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC3_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC3_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC4_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC4_SNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC5_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC5_SNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC6H_UFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC6H_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC7_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::BC7_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ETC2_R8G8B8_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ETC2_R8G8B8_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ETC2_R8G8B8A1_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ETC2_R8G8B8A1_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ETC2_R8G8B8A8_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ETC2_R8G8B8A8_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::EAC_R11_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::EAC_R11_SNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::EAC_R11G11_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::EAC_R11G11_SNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_4x4_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_4x4_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_5x4_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_5x4_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_5x5_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_5x5_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_6x5_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_6x5_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_6x6_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_6x6_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_8x5_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_8x5_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_8x6_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_8x6_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_8x8_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_8x8_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_10x5_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_10x5_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_10x6_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_10x6_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_10x8_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_10x8_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_10x10_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_10x10_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_12x10_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_12x10_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_12x12_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_12x12_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::G8B8G8R8_422_UNORM => crate::image::ImageAspects::COLOR,
+ Self::B8G8R8G8_422_UNORM => crate::image::ImageAspects::COLOR,
+ Self::G8_B8_R8_3PLANE_420_UNORM => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ | crate::image::ImageAspects::PLANE_2
+ }
+ Self::G8_B8R8_2PLANE_420_UNORM => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ }
+ Self::G8_B8_R8_3PLANE_422_UNORM => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ | crate::image::ImageAspects::PLANE_2
+ }
+ Self::G8_B8R8_2PLANE_422_UNORM => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ }
+ Self::G8_B8_R8_3PLANE_444_UNORM => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ | crate::image::ImageAspects::PLANE_2
+ }
+ Self::R10X6_UNORM_PACK16 => crate::image::ImageAspects::COLOR,
+ Self::R10X6G10X6_UNORM_2PACK16 => crate::image::ImageAspects::COLOR,
+ Self::R10X6G10X6B10X6A10X6_UNORM_4PACK16 => crate::image::ImageAspects::COLOR,
+ Self::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => crate::image::ImageAspects::COLOR,
+ Self::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => crate::image::ImageAspects::COLOR,
+ Self::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ | crate::image::ImageAspects::PLANE_2
+ }
+ Self::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ | crate::image::ImageAspects::PLANE_2
+ }
+ Self::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ | crate::image::ImageAspects::PLANE_2
+ }
+ Self::R12X4_UNORM_PACK16 => crate::image::ImageAspects::COLOR,
+ Self::R12X4G12X4_UNORM_2PACK16 => crate::image::ImageAspects::COLOR,
+ Self::R12X4G12X4B12X4A12X4_UNORM_4PACK16 => crate::image::ImageAspects::COLOR,
+ Self::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => crate::image::ImageAspects::COLOR,
+ Self::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => crate::image::ImageAspects::COLOR,
+ Self::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ | crate::image::ImageAspects::PLANE_2
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ | crate::image::ImageAspects::PLANE_2
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ | crate::image::ImageAspects::PLANE_2
+ }
+ Self::G16B16G16R16_422_UNORM => crate::image::ImageAspects::COLOR,
+ Self::B16G16R16G16_422_UNORM => crate::image::ImageAspects::COLOR,
+ Self::G16_B16_R16_3PLANE_420_UNORM => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ | crate::image::ImageAspects::PLANE_2
+ }
+ Self::G16_B16R16_2PLANE_420_UNORM => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ }
+ Self::G16_B16_R16_3PLANE_422_UNORM => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ | crate::image::ImageAspects::PLANE_2
+ }
+ Self::G16_B16R16_2PLANE_422_UNORM => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ }
+ Self::G16_B16_R16_3PLANE_444_UNORM => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ | crate::image::ImageAspects::PLANE_2
+ }
+ Self::PVRTC1_2BPP_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::PVRTC1_4BPP_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::PVRTC2_2BPP_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::PVRTC2_4BPP_UNORM_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::PVRTC1_2BPP_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::PVRTC1_4BPP_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::PVRTC2_2BPP_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::PVRTC2_4BPP_SRGB_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_4x4_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_5x4_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_5x5_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_6x5_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_6x6_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_8x5_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_8x6_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_8x8_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_10x5_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_10x6_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_10x8_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_10x10_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_12x10_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::ASTC_12x12_SFLOAT_BLOCK => crate::image::ImageAspects::COLOR,
+ Self::G8_B8R8_2PLANE_444_UNORM => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ }
+ Self::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ }
+ Self::G16_B16R16_2PLANE_444_UNORM => {
+ crate::image::ImageAspects::COLOR
+ | crate::image::ImageAspects::PLANE_0
+ | crate::image::ImageAspects::PLANE_1
+ }
+ Self::A4R4G4B4_UNORM_PACK16 => crate::image::ImageAspects::COLOR,
+ Self::A4B4G4R4_UNORM_PACK16 => crate::image::ImageAspects::COLOR,
+ Self::R16G16_S10_5_NV => crate::image::ImageAspects::COLOR,
+ }
+ }
+ #[doc = r" Returns the extent in texels (horizontally and vertically) of a single texel"]
+ #[doc = r" block of this format. A texel block is a rectangle of pixels that is represented by"]
+ #[doc = r" a single element of this format. It is also the minimum granularity of the extent of"]
+ #[doc = r" an image; images must always have an extent that's a multiple of the block extent."]
+ #[doc = r""]
+ #[doc = r" For normal formats, the block extent is [1, 1, 1], meaning that each element of the"]
+ #[doc = r" format represents one texel. Block-compressed formats encode multiple texels into"]
+ #[doc = r" a single element. The 422 and 420 YCbCr formats have a block extent of [2, 1, 1] and"]
+ #[doc = r" [2, 2, 1] respectively, as the red and blue components are shared across multiple"]
+ #[doc = r" texels."]
+ pub fn block_extent(self) -> [u32; 3] {
+ match self {
+ Self::BC1_RGB_UNORM_BLOCK => [4, 4, 1],
+ Self::BC1_RGB_SRGB_BLOCK => [4, 4, 1],
+ Self::BC1_RGBA_UNORM_BLOCK => [4, 4, 1],
+ Self::BC1_RGBA_SRGB_BLOCK => [4, 4, 1],
+ Self::BC2_UNORM_BLOCK => [4, 4, 1],
+ Self::BC2_SRGB_BLOCK => [4, 4, 1],
+ Self::BC3_UNORM_BLOCK => [4, 4, 1],
+ Self::BC3_SRGB_BLOCK => [4, 4, 1],
+ Self::BC4_UNORM_BLOCK => [4, 4, 1],
+ Self::BC4_SNORM_BLOCK => [4, 4, 1],
+ Self::BC5_UNORM_BLOCK => [4, 4, 1],
+ Self::BC5_SNORM_BLOCK => [4, 4, 1],
+ Self::BC6H_UFLOAT_BLOCK => [4, 4, 1],
+ Self::BC6H_SFLOAT_BLOCK => [4, 4, 1],
+ Self::BC7_UNORM_BLOCK => [4, 4, 1],
+ Self::BC7_SRGB_BLOCK => [4, 4, 1],
+ Self::ETC2_R8G8B8_UNORM_BLOCK => [4, 4, 1],
+ Self::ETC2_R8G8B8_SRGB_BLOCK => [4, 4, 1],
+ Self::ETC2_R8G8B8A1_UNORM_BLOCK => [4, 4, 1],
+ Self::ETC2_R8G8B8A1_SRGB_BLOCK => [4, 4, 1],
+ Self::ETC2_R8G8B8A8_UNORM_BLOCK => [4, 4, 1],
+ Self::ETC2_R8G8B8A8_SRGB_BLOCK => [4, 4, 1],
+ Self::EAC_R11_UNORM_BLOCK => [4, 4, 1],
+ Self::EAC_R11_SNORM_BLOCK => [4, 4, 1],
+ Self::EAC_R11G11_UNORM_BLOCK => [4, 4, 1],
+ Self::EAC_R11G11_SNORM_BLOCK => [4, 4, 1],
+ Self::ASTC_4x4_UNORM_BLOCK => [4, 4, 1],
+ Self::ASTC_4x4_SRGB_BLOCK => [4, 4, 1],
+ Self::ASTC_5x4_UNORM_BLOCK => [5, 4, 1],
+ Self::ASTC_5x4_SRGB_BLOCK => [5, 4, 1],
+ Self::ASTC_5x5_UNORM_BLOCK => [5, 5, 1],
+ Self::ASTC_5x5_SRGB_BLOCK => [5, 5, 1],
+ Self::ASTC_6x5_UNORM_BLOCK => [6, 5, 1],
+ Self::ASTC_6x5_SRGB_BLOCK => [6, 5, 1],
+ Self::ASTC_6x6_UNORM_BLOCK => [6, 6, 1],
+ Self::ASTC_6x6_SRGB_BLOCK => [6, 6, 1],
+ Self::ASTC_8x5_UNORM_BLOCK => [8, 5, 1],
+ Self::ASTC_8x5_SRGB_BLOCK => [8, 5, 1],
+ Self::ASTC_8x6_UNORM_BLOCK => [8, 6, 1],
+ Self::ASTC_8x6_SRGB_BLOCK => [8, 6, 1],
+ Self::ASTC_8x8_UNORM_BLOCK => [8, 8, 1],
+ Self::ASTC_8x8_SRGB_BLOCK => [8, 8, 1],
+ Self::ASTC_10x5_UNORM_BLOCK => [10, 5, 1],
+ Self::ASTC_10x5_SRGB_BLOCK => [10, 5, 1],
+ Self::ASTC_10x6_UNORM_BLOCK => [10, 6, 1],
+ Self::ASTC_10x6_SRGB_BLOCK => [10, 6, 1],
+ Self::ASTC_10x8_UNORM_BLOCK => [10, 8, 1],
+ Self::ASTC_10x8_SRGB_BLOCK => [10, 8, 1],
+ Self::ASTC_10x10_UNORM_BLOCK => [10, 10, 1],
+ Self::ASTC_10x10_SRGB_BLOCK => [10, 10, 1],
+ Self::ASTC_12x10_UNORM_BLOCK => [12, 10, 1],
+ Self::ASTC_12x10_SRGB_BLOCK => [12, 10, 1],
+ Self::ASTC_12x12_UNORM_BLOCK => [12, 12, 1],
+ Self::ASTC_12x12_SRGB_BLOCK => [12, 12, 1],
+ Self::G8B8G8R8_422_UNORM => [2, 1, 1],
+ Self::B8G8R8G8_422_UNORM => [2, 1, 1],
+ Self::G8_B8_R8_3PLANE_420_UNORM => [2, 2, 1],
+ Self::G8_B8R8_2PLANE_420_UNORM => [2, 2, 1],
+ Self::G8_B8_R8_3PLANE_422_UNORM => [2, 1, 1],
+ Self::G8_B8R8_2PLANE_422_UNORM => [2, 1, 1],
+ Self::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => [2, 1, 1],
+ Self::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => [2, 1, 1],
+ Self::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => [2, 2, 1],
+ Self::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => [2, 2, 1],
+ Self::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => [2, 1, 1],
+ Self::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => [2, 1, 1],
+ Self::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => [2, 1, 1],
+ Self::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => [2, 1, 1],
+ Self::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => [2, 2, 1],
+ Self::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => [2, 2, 1],
+ Self::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => [2, 1, 1],
+ Self::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => [2, 1, 1],
+ Self::G16B16G16R16_422_UNORM => [2, 1, 1],
+ Self::B16G16R16G16_422_UNORM => [2, 1, 1],
+ Self::G16_B16_R16_3PLANE_420_UNORM => [2, 2, 1],
+ Self::G16_B16R16_2PLANE_420_UNORM => [2, 2, 1],
+ Self::G16_B16_R16_3PLANE_422_UNORM => [2, 1, 1],
+ Self::G16_B16R16_2PLANE_422_UNORM => [2, 1, 1],
+ Self::PVRTC1_2BPP_UNORM_BLOCK => [8, 4, 1],
+ Self::PVRTC1_4BPP_UNORM_BLOCK => [4, 4, 1],
+ Self::PVRTC2_2BPP_UNORM_BLOCK => [8, 4, 1],
+ Self::PVRTC2_4BPP_UNORM_BLOCK => [4, 4, 1],
+ Self::PVRTC1_2BPP_SRGB_BLOCK => [8, 4, 1],
+ Self::PVRTC1_4BPP_SRGB_BLOCK => [4, 4, 1],
+ Self::PVRTC2_2BPP_SRGB_BLOCK => [8, 4, 1],
+ Self::PVRTC2_4BPP_SRGB_BLOCK => [4, 4, 1],
+ Self::ASTC_4x4_SFLOAT_BLOCK => [4, 4, 1],
+ Self::ASTC_5x4_SFLOAT_BLOCK => [5, 4, 1],
+ Self::ASTC_5x5_SFLOAT_BLOCK => [5, 5, 1],
+ Self::ASTC_6x5_SFLOAT_BLOCK => [6, 5, 1],
+ Self::ASTC_6x6_SFLOAT_BLOCK => [6, 6, 1],
+ Self::ASTC_8x5_SFLOAT_BLOCK => [8, 5, 1],
+ Self::ASTC_8x6_SFLOAT_BLOCK => [8, 6, 1],
+ Self::ASTC_8x8_SFLOAT_BLOCK => [8, 8, 1],
+ Self::ASTC_10x5_SFLOAT_BLOCK => [10, 5, 1],
+ Self::ASTC_10x6_SFLOAT_BLOCK => [10, 6, 1],
+ Self::ASTC_10x8_SFLOAT_BLOCK => [10, 8, 1],
+ Self::ASTC_10x10_SFLOAT_BLOCK => [10, 10, 1],
+ Self::ASTC_12x10_SFLOAT_BLOCK => [12, 10, 1],
+ Self::ASTC_12x12_SFLOAT_BLOCK => [12, 12, 1],
+ _ => [1, 1, 1],
+ }
+ }
+ #[doc = r" Returns the size in bytes of a single texel block of this format. Returns `None`"]
+ #[doc = r" if the texel block size is not well-defined for this format."]
+ #[doc = r""]
+ #[doc = r" For regular formats, this is the size of a single texel, but for more specialized"]
+ #[doc = r" formats this may be the size of multiple texels."]
+ #[doc = r""]
+ #[doc = r" Depth/stencil formats are considered to have an opaque memory representation, and do"]
+ #[doc = r" not have a well-defined size. Multi-planar formats store the color components"]
+ #[doc = r" disjointly in memory, and therefore do not have a well-defined size for all"]
+ #[doc = r" components as a whole. The individual planes do have a well-defined size."]
+ pub fn block_size(self) -> Option<DeviceSize> {
+ match self {
+ Self::R4G4_UNORM_PACK8 => Some(1),
+ Self::R4G4B4A4_UNORM_PACK16 => Some(2),
+ Self::B4G4R4A4_UNORM_PACK16 => Some(2),
+ Self::R5G6B5_UNORM_PACK16 => Some(2),
+ Self::B5G6R5_UNORM_PACK16 => Some(2),
+ Self::R5G5B5A1_UNORM_PACK16 => Some(2),
+ Self::B5G5R5A1_UNORM_PACK16 => Some(2),
+ Self::A1R5G5B5_UNORM_PACK16 => Some(2),
+ Self::R8_UNORM => Some(1),
+ Self::R8_SNORM => Some(1),
+ Self::R8_USCALED => Some(1),
+ Self::R8_SSCALED => Some(1),
+ Self::R8_UINT => Some(1),
+ Self::R8_SINT => Some(1),
+ Self::R8_SRGB => Some(1),
+ Self::R8G8_UNORM => Some(2),
+ Self::R8G8_SNORM => Some(2),
+ Self::R8G8_USCALED => Some(2),
+ Self::R8G8_SSCALED => Some(2),
+ Self::R8G8_UINT => Some(2),
+ Self::R8G8_SINT => Some(2),
+ Self::R8G8_SRGB => Some(2),
+ Self::R8G8B8_UNORM => Some(3),
+ Self::R8G8B8_SNORM => Some(3),
+ Self::R8G8B8_USCALED => Some(3),
+ Self::R8G8B8_SSCALED => Some(3),
+ Self::R8G8B8_UINT => Some(3),
+ Self::R8G8B8_SINT => Some(3),
+ Self::R8G8B8_SRGB => Some(3),
+ Self::B8G8R8_UNORM => Some(3),
+ Self::B8G8R8_SNORM => Some(3),
+ Self::B8G8R8_USCALED => Some(3),
+ Self::B8G8R8_SSCALED => Some(3),
+ Self::B8G8R8_UINT => Some(3),
+ Self::B8G8R8_SINT => Some(3),
+ Self::B8G8R8_SRGB => Some(3),
+ Self::R8G8B8A8_UNORM => Some(4),
+ Self::R8G8B8A8_SNORM => Some(4),
+ Self::R8G8B8A8_USCALED => Some(4),
+ Self::R8G8B8A8_SSCALED => Some(4),
+ Self::R8G8B8A8_UINT => Some(4),
+ Self::R8G8B8A8_SINT => Some(4),
+ Self::R8G8B8A8_SRGB => Some(4),
+ Self::B8G8R8A8_UNORM => Some(4),
+ Self::B8G8R8A8_SNORM => Some(4),
+ Self::B8G8R8A8_USCALED => Some(4),
+ Self::B8G8R8A8_SSCALED => Some(4),
+ Self::B8G8R8A8_UINT => Some(4),
+ Self::B8G8R8A8_SINT => Some(4),
+ Self::B8G8R8A8_SRGB => Some(4),
+ Self::A8B8G8R8_UNORM_PACK32 => Some(4),
+ Self::A8B8G8R8_SNORM_PACK32 => Some(4),
+ Self::A8B8G8R8_USCALED_PACK32 => Some(4),
+ Self::A8B8G8R8_SSCALED_PACK32 => Some(4),
+ Self::A8B8G8R8_UINT_PACK32 => Some(4),
+ Self::A8B8G8R8_SINT_PACK32 => Some(4),
+ Self::A8B8G8R8_SRGB_PACK32 => Some(4),
+ Self::A2R10G10B10_UNORM_PACK32 => Some(4),
+ Self::A2R10G10B10_SNORM_PACK32 => Some(4),
+ Self::A2R10G10B10_USCALED_PACK32 => Some(4),
+ Self::A2R10G10B10_SSCALED_PACK32 => Some(4),
+ Self::A2R10G10B10_UINT_PACK32 => Some(4),
+ Self::A2R10G10B10_SINT_PACK32 => Some(4),
+ Self::A2B10G10R10_UNORM_PACK32 => Some(4),
+ Self::A2B10G10R10_SNORM_PACK32 => Some(4),
+ Self::A2B10G10R10_USCALED_PACK32 => Some(4),
+ Self::A2B10G10R10_SSCALED_PACK32 => Some(4),
+ Self::A2B10G10R10_UINT_PACK32 => Some(4),
+ Self::A2B10G10R10_SINT_PACK32 => Some(4),
+ Self::R16_UNORM => Some(2),
+ Self::R16_SNORM => Some(2),
+ Self::R16_USCALED => Some(2),
+ Self::R16_SSCALED => Some(2),
+ Self::R16_UINT => Some(2),
+ Self::R16_SINT => Some(2),
+ Self::R16_SFLOAT => Some(2),
+ Self::R16G16_UNORM => Some(4),
+ Self::R16G16_SNORM => Some(4),
+ Self::R16G16_USCALED => Some(4),
+ Self::R16G16_SSCALED => Some(4),
+ Self::R16G16_UINT => Some(4),
+ Self::R16G16_SINT => Some(4),
+ Self::R16G16_SFLOAT => Some(4),
+ Self::R16G16B16_UNORM => Some(6),
+ Self::R16G16B16_SNORM => Some(6),
+ Self::R16G16B16_USCALED => Some(6),
+ Self::R16G16B16_SSCALED => Some(6),
+ Self::R16G16B16_UINT => Some(6),
+ Self::R16G16B16_SINT => Some(6),
+ Self::R16G16B16_SFLOAT => Some(6),
+ Self::R16G16B16A16_UNORM => Some(8),
+ Self::R16G16B16A16_SNORM => Some(8),
+ Self::R16G16B16A16_USCALED => Some(8),
+ Self::R16G16B16A16_SSCALED => Some(8),
+ Self::R16G16B16A16_UINT => Some(8),
+ Self::R16G16B16A16_SINT => Some(8),
+ Self::R16G16B16A16_SFLOAT => Some(8),
+ Self::R32_UINT => Some(4),
+ Self::R32_SINT => Some(4),
+ Self::R32_SFLOAT => Some(4),
+ Self::R32G32_UINT => Some(8),
+ Self::R32G32_SINT => Some(8),
+ Self::R32G32_SFLOAT => Some(8),
+ Self::R32G32B32_UINT => Some(12),
+ Self::R32G32B32_SINT => Some(12),
+ Self::R32G32B32_SFLOAT => Some(12),
+ Self::R32G32B32A32_UINT => Some(16),
+ Self::R32G32B32A32_SINT => Some(16),
+ Self::R32G32B32A32_SFLOAT => Some(16),
+ Self::R64_UINT => Some(8),
+ Self::R64_SINT => Some(8),
+ Self::R64_SFLOAT => Some(8),
+ Self::R64G64_UINT => Some(16),
+ Self::R64G64_SINT => Some(16),
+ Self::R64G64_SFLOAT => Some(16),
+ Self::R64G64B64_UINT => Some(24),
+ Self::R64G64B64_SINT => Some(24),
+ Self::R64G64B64_SFLOAT => Some(24),
+ Self::R64G64B64A64_UINT => Some(32),
+ Self::R64G64B64A64_SINT => Some(32),
+ Self::R64G64B64A64_SFLOAT => Some(32),
+ Self::B10G11R11_UFLOAT_PACK32 => Some(4),
+ Self::E5B9G9R9_UFLOAT_PACK32 => Some(4),
+ Self::BC1_RGB_UNORM_BLOCK => Some(8),
+ Self::BC1_RGB_SRGB_BLOCK => Some(8),
+ Self::BC1_RGBA_UNORM_BLOCK => Some(8),
+ Self::BC1_RGBA_SRGB_BLOCK => Some(8),
+ Self::BC2_UNORM_BLOCK => Some(16),
+ Self::BC2_SRGB_BLOCK => Some(16),
+ Self::BC3_UNORM_BLOCK => Some(16),
+ Self::BC3_SRGB_BLOCK => Some(16),
+ Self::BC4_UNORM_BLOCK => Some(8),
+ Self::BC4_SNORM_BLOCK => Some(8),
+ Self::BC5_UNORM_BLOCK => Some(16),
+ Self::BC5_SNORM_BLOCK => Some(16),
+ Self::BC6H_UFLOAT_BLOCK => Some(16),
+ Self::BC6H_SFLOAT_BLOCK => Some(16),
+ Self::BC7_UNORM_BLOCK => Some(16),
+ Self::BC7_SRGB_BLOCK => Some(16),
+ Self::ETC2_R8G8B8_UNORM_BLOCK => Some(8),
+ Self::ETC2_R8G8B8_SRGB_BLOCK => Some(8),
+ Self::ETC2_R8G8B8A1_UNORM_BLOCK => Some(8),
+ Self::ETC2_R8G8B8A1_SRGB_BLOCK => Some(8),
+ Self::ETC2_R8G8B8A8_UNORM_BLOCK => Some(16),
+ Self::ETC2_R8G8B8A8_SRGB_BLOCK => Some(16),
+ Self::EAC_R11_UNORM_BLOCK => Some(8),
+ Self::EAC_R11_SNORM_BLOCK => Some(8),
+ Self::EAC_R11G11_UNORM_BLOCK => Some(16),
+ Self::EAC_R11G11_SNORM_BLOCK => Some(16),
+ Self::ASTC_4x4_UNORM_BLOCK => Some(16),
+ Self::ASTC_4x4_SRGB_BLOCK => Some(16),
+ Self::ASTC_5x4_UNORM_BLOCK => Some(16),
+ Self::ASTC_5x4_SRGB_BLOCK => Some(16),
+ Self::ASTC_5x5_UNORM_BLOCK => Some(16),
+ Self::ASTC_5x5_SRGB_BLOCK => Some(16),
+ Self::ASTC_6x5_UNORM_BLOCK => Some(16),
+ Self::ASTC_6x5_SRGB_BLOCK => Some(16),
+ Self::ASTC_6x6_UNORM_BLOCK => Some(16),
+ Self::ASTC_6x6_SRGB_BLOCK => Some(16),
+ Self::ASTC_8x5_UNORM_BLOCK => Some(16),
+ Self::ASTC_8x5_SRGB_BLOCK => Some(16),
+ Self::ASTC_8x6_UNORM_BLOCK => Some(16),
+ Self::ASTC_8x6_SRGB_BLOCK => Some(16),
+ Self::ASTC_8x8_UNORM_BLOCK => Some(16),
+ Self::ASTC_8x8_SRGB_BLOCK => Some(16),
+ Self::ASTC_10x5_UNORM_BLOCK => Some(16),
+ Self::ASTC_10x5_SRGB_BLOCK => Some(16),
+ Self::ASTC_10x6_UNORM_BLOCK => Some(16),
+ Self::ASTC_10x6_SRGB_BLOCK => Some(16),
+ Self::ASTC_10x8_UNORM_BLOCK => Some(16),
+ Self::ASTC_10x8_SRGB_BLOCK => Some(16),
+ Self::ASTC_10x10_UNORM_BLOCK => Some(16),
+ Self::ASTC_10x10_SRGB_BLOCK => Some(16),
+ Self::ASTC_12x10_UNORM_BLOCK => Some(16),
+ Self::ASTC_12x10_SRGB_BLOCK => Some(16),
+ Self::ASTC_12x12_UNORM_BLOCK => Some(16),
+ Self::ASTC_12x12_SRGB_BLOCK => Some(16),
+ Self::G8B8G8R8_422_UNORM => Some(4),
+ Self::B8G8R8G8_422_UNORM => Some(4),
+ Self::R10X6_UNORM_PACK16 => Some(2),
+ Self::R10X6G10X6_UNORM_2PACK16 => Some(4),
+ Self::R10X6G10X6B10X6A10X6_UNORM_4PACK16 => Some(8),
+ Self::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => Some(8),
+ Self::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => Some(8),
+ Self::R12X4_UNORM_PACK16 => Some(2),
+ Self::R12X4G12X4_UNORM_2PACK16 => Some(4),
+ Self::R12X4G12X4B12X4A12X4_UNORM_4PACK16 => Some(8),
+ Self::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => Some(8),
+ Self::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => Some(8),
+ Self::G16B16G16R16_422_UNORM => Some(8),
+ Self::B16G16R16G16_422_UNORM => Some(8),
+ Self::PVRTC1_2BPP_UNORM_BLOCK => Some(8),
+ Self::PVRTC1_4BPP_UNORM_BLOCK => Some(8),
+ Self::PVRTC2_2BPP_UNORM_BLOCK => Some(8),
+ Self::PVRTC2_4BPP_UNORM_BLOCK => Some(8),
+ Self::PVRTC1_2BPP_SRGB_BLOCK => Some(8),
+ Self::PVRTC1_4BPP_SRGB_BLOCK => Some(8),
+ Self::PVRTC2_2BPP_SRGB_BLOCK => Some(8),
+ Self::PVRTC2_4BPP_SRGB_BLOCK => Some(8),
+ Self::ASTC_4x4_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_5x4_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_5x5_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_6x5_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_6x6_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_8x5_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_8x6_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_8x8_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_10x5_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_10x6_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_10x8_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_10x10_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_12x10_SFLOAT_BLOCK => Some(16),
+ Self::ASTC_12x12_SFLOAT_BLOCK => Some(16),
+ Self::A4R4G4B4_UNORM_PACK16 => Some(2),
+ Self::A4B4G4R4_UNORM_PACK16 => Some(2),
+ Self::R16G16_S10_5_NV => Some(4),
+ _ => None,
+ }
+ }
+ #[doc = r" Returns the an opaque object representing the compatibility class of the format."]
+ #[doc = r" This can be used to determine whether two formats are compatible for the purposes"]
+ #[doc = r" of certain Vulkan operations, such as image copying."]
+ pub fn compatibility(self) -> FormatCompatibility {
+ FormatCompatibility(match self {
+ Self::R4G4_UNORM_PACK8 => &FormatCompatibilityInner::Class_8bit,
+ Self::R4G4B4A4_UNORM_PACK16 => &FormatCompatibilityInner::Class_16bit,
+ Self::B4G4R4A4_UNORM_PACK16 => &FormatCompatibilityInner::Class_16bit,
+ Self::R5G6B5_UNORM_PACK16 => &FormatCompatibilityInner::Class_16bit,
+ Self::B5G6R5_UNORM_PACK16 => &FormatCompatibilityInner::Class_16bit,
+ Self::R5G5B5A1_UNORM_PACK16 => &FormatCompatibilityInner::Class_16bit,
+ Self::B5G5R5A1_UNORM_PACK16 => &FormatCompatibilityInner::Class_16bit,
+ Self::A1R5G5B5_UNORM_PACK16 => &FormatCompatibilityInner::Class_16bit,
+ Self::R8_UNORM => &FormatCompatibilityInner::Class_8bit,
+ Self::R8_SNORM => &FormatCompatibilityInner::Class_8bit,
+ Self::R8_USCALED => &FormatCompatibilityInner::Class_8bit,
+ Self::R8_SSCALED => &FormatCompatibilityInner::Class_8bit,
+ Self::R8_UINT => &FormatCompatibilityInner::Class_8bit,
+ Self::R8_SINT => &FormatCompatibilityInner::Class_8bit,
+ Self::R8_SRGB => &FormatCompatibilityInner::Class_8bit,
+ Self::R8G8_UNORM => &FormatCompatibilityInner::Class_16bit,
+ Self::R8G8_SNORM => &FormatCompatibilityInner::Class_16bit,
+ Self::R8G8_USCALED => &FormatCompatibilityInner::Class_16bit,
+ Self::R8G8_SSCALED => &FormatCompatibilityInner::Class_16bit,
+ Self::R8G8_UINT => &FormatCompatibilityInner::Class_16bit,
+ Self::R8G8_SINT => &FormatCompatibilityInner::Class_16bit,
+ Self::R8G8_SRGB => &FormatCompatibilityInner::Class_16bit,
+ Self::R8G8B8_UNORM => &FormatCompatibilityInner::Class_24bit,
+ Self::R8G8B8_SNORM => &FormatCompatibilityInner::Class_24bit,
+ Self::R8G8B8_USCALED => &FormatCompatibilityInner::Class_24bit,
+ Self::R8G8B8_SSCALED => &FormatCompatibilityInner::Class_24bit,
+ Self::R8G8B8_UINT => &FormatCompatibilityInner::Class_24bit,
+ Self::R8G8B8_SINT => &FormatCompatibilityInner::Class_24bit,
+ Self::R8G8B8_SRGB => &FormatCompatibilityInner::Class_24bit,
+ Self::B8G8R8_UNORM => &FormatCompatibilityInner::Class_24bit,
+ Self::B8G8R8_SNORM => &FormatCompatibilityInner::Class_24bit,
+ Self::B8G8R8_USCALED => &FormatCompatibilityInner::Class_24bit,
+ Self::B8G8R8_SSCALED => &FormatCompatibilityInner::Class_24bit,
+ Self::B8G8R8_UINT => &FormatCompatibilityInner::Class_24bit,
+ Self::B8G8R8_SINT => &FormatCompatibilityInner::Class_24bit,
+ Self::B8G8R8_SRGB => &FormatCompatibilityInner::Class_24bit,
+ Self::R8G8B8A8_UNORM => &FormatCompatibilityInner::Class_32bit,
+ Self::R8G8B8A8_SNORM => &FormatCompatibilityInner::Class_32bit,
+ Self::R8G8B8A8_USCALED => &FormatCompatibilityInner::Class_32bit,
+ Self::R8G8B8A8_SSCALED => &FormatCompatibilityInner::Class_32bit,
+ Self::R8G8B8A8_UINT => &FormatCompatibilityInner::Class_32bit,
+ Self::R8G8B8A8_SINT => &FormatCompatibilityInner::Class_32bit,
+ Self::R8G8B8A8_SRGB => &FormatCompatibilityInner::Class_32bit,
+ Self::B8G8R8A8_UNORM => &FormatCompatibilityInner::Class_32bit,
+ Self::B8G8R8A8_SNORM => &FormatCompatibilityInner::Class_32bit,
+ Self::B8G8R8A8_USCALED => &FormatCompatibilityInner::Class_32bit,
+ Self::B8G8R8A8_SSCALED => &FormatCompatibilityInner::Class_32bit,
+ Self::B8G8R8A8_UINT => &FormatCompatibilityInner::Class_32bit,
+ Self::B8G8R8A8_SINT => &FormatCompatibilityInner::Class_32bit,
+ Self::B8G8R8A8_SRGB => &FormatCompatibilityInner::Class_32bit,
+ Self::A8B8G8R8_UNORM_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A8B8G8R8_SNORM_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A8B8G8R8_USCALED_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A8B8G8R8_SSCALED_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A8B8G8R8_UINT_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A8B8G8R8_SINT_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A8B8G8R8_SRGB_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A2R10G10B10_UNORM_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A2R10G10B10_SNORM_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A2R10G10B10_USCALED_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A2R10G10B10_SSCALED_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A2R10G10B10_UINT_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A2R10G10B10_SINT_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A2B10G10R10_UNORM_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A2B10G10R10_SNORM_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A2B10G10R10_USCALED_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A2B10G10R10_SSCALED_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A2B10G10R10_UINT_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::A2B10G10R10_SINT_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::R16_UNORM => &FormatCompatibilityInner::Class_16bit,
+ Self::R16_SNORM => &FormatCompatibilityInner::Class_16bit,
+ Self::R16_USCALED => &FormatCompatibilityInner::Class_16bit,
+ Self::R16_SSCALED => &FormatCompatibilityInner::Class_16bit,
+ Self::R16_UINT => &FormatCompatibilityInner::Class_16bit,
+ Self::R16_SINT => &FormatCompatibilityInner::Class_16bit,
+ Self::R16_SFLOAT => &FormatCompatibilityInner::Class_16bit,
+ Self::R16G16_UNORM => &FormatCompatibilityInner::Class_32bit,
+ Self::R16G16_SNORM => &FormatCompatibilityInner::Class_32bit,
+ Self::R16G16_USCALED => &FormatCompatibilityInner::Class_32bit,
+ Self::R16G16_SSCALED => &FormatCompatibilityInner::Class_32bit,
+ Self::R16G16_UINT => &FormatCompatibilityInner::Class_32bit,
+ Self::R16G16_SINT => &FormatCompatibilityInner::Class_32bit,
+ Self::R16G16_SFLOAT => &FormatCompatibilityInner::Class_32bit,
+ Self::R16G16B16_UNORM => &FormatCompatibilityInner::Class_48bit,
+ Self::R16G16B16_SNORM => &FormatCompatibilityInner::Class_48bit,
+ Self::R16G16B16_USCALED => &FormatCompatibilityInner::Class_48bit,
+ Self::R16G16B16_SSCALED => &FormatCompatibilityInner::Class_48bit,
+ Self::R16G16B16_UINT => &FormatCompatibilityInner::Class_48bit,
+ Self::R16G16B16_SINT => &FormatCompatibilityInner::Class_48bit,
+ Self::R16G16B16_SFLOAT => &FormatCompatibilityInner::Class_48bit,
+ Self::R16G16B16A16_UNORM => &FormatCompatibilityInner::Class_64bit,
+ Self::R16G16B16A16_SNORM => &FormatCompatibilityInner::Class_64bit,
+ Self::R16G16B16A16_USCALED => &FormatCompatibilityInner::Class_64bit,
+ Self::R16G16B16A16_SSCALED => &FormatCompatibilityInner::Class_64bit,
+ Self::R16G16B16A16_UINT => &FormatCompatibilityInner::Class_64bit,
+ Self::R16G16B16A16_SINT => &FormatCompatibilityInner::Class_64bit,
+ Self::R16G16B16A16_SFLOAT => &FormatCompatibilityInner::Class_64bit,
+ Self::R32_UINT => &FormatCompatibilityInner::Class_32bit,
+ Self::R32_SINT => &FormatCompatibilityInner::Class_32bit,
+ Self::R32_SFLOAT => &FormatCompatibilityInner::Class_32bit,
+ Self::R32G32_UINT => &FormatCompatibilityInner::Class_64bit,
+ Self::R32G32_SINT => &FormatCompatibilityInner::Class_64bit,
+ Self::R32G32_SFLOAT => &FormatCompatibilityInner::Class_64bit,
+ Self::R32G32B32_UINT => &FormatCompatibilityInner::Class_96bit,
+ Self::R32G32B32_SINT => &FormatCompatibilityInner::Class_96bit,
+ Self::R32G32B32_SFLOAT => &FormatCompatibilityInner::Class_96bit,
+ Self::R32G32B32A32_UINT => &FormatCompatibilityInner::Class_128bit,
+ Self::R32G32B32A32_SINT => &FormatCompatibilityInner::Class_128bit,
+ Self::R32G32B32A32_SFLOAT => &FormatCompatibilityInner::Class_128bit,
+ Self::R64_UINT => &FormatCompatibilityInner::Class_64bit,
+ Self::R64_SINT => &FormatCompatibilityInner::Class_64bit,
+ Self::R64_SFLOAT => &FormatCompatibilityInner::Class_64bit,
+ Self::R64G64_UINT => &FormatCompatibilityInner::Class_128bit,
+ Self::R64G64_SINT => &FormatCompatibilityInner::Class_128bit,
+ Self::R64G64_SFLOAT => &FormatCompatibilityInner::Class_128bit,
+ Self::R64G64B64_UINT => &FormatCompatibilityInner::Class_192bit,
+ Self::R64G64B64_SINT => &FormatCompatibilityInner::Class_192bit,
+ Self::R64G64B64_SFLOAT => &FormatCompatibilityInner::Class_192bit,
+ Self::R64G64B64A64_UINT => &FormatCompatibilityInner::Class_256bit,
+ Self::R64G64B64A64_SINT => &FormatCompatibilityInner::Class_256bit,
+ Self::R64G64B64A64_SFLOAT => &FormatCompatibilityInner::Class_256bit,
+ Self::B10G11R11_UFLOAT_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::E5B9G9R9_UFLOAT_PACK32 => &FormatCompatibilityInner::Class_32bit,
+ Self::D16_UNORM => &FormatCompatibilityInner::Class_D16,
+ Self::X8_D24_UNORM_PACK32 => &FormatCompatibilityInner::Class_D24,
+ Self::D32_SFLOAT => &FormatCompatibilityInner::Class_D32,
+ Self::S8_UINT => &FormatCompatibilityInner::Class_S8,
+ Self::D16_UNORM_S8_UINT => &FormatCompatibilityInner::Class_D16S8,
+ Self::D24_UNORM_S8_UINT => &FormatCompatibilityInner::Class_D24S8,
+ Self::D32_SFLOAT_S8_UINT => &FormatCompatibilityInner::Class_D32S8,
+ Self::BC1_RGB_UNORM_BLOCK => &FormatCompatibilityInner::Class_BC1_RGB,
+ Self::BC1_RGB_SRGB_BLOCK => &FormatCompatibilityInner::Class_BC1_RGB,
+ Self::BC1_RGBA_UNORM_BLOCK => &FormatCompatibilityInner::Class_BC1_RGBA,
+ Self::BC1_RGBA_SRGB_BLOCK => &FormatCompatibilityInner::Class_BC1_RGBA,
+ Self::BC2_UNORM_BLOCK => &FormatCompatibilityInner::Class_BC2,
+ Self::BC2_SRGB_BLOCK => &FormatCompatibilityInner::Class_BC2,
+ Self::BC3_UNORM_BLOCK => &FormatCompatibilityInner::Class_BC3,
+ Self::BC3_SRGB_BLOCK => &FormatCompatibilityInner::Class_BC3,
+ Self::BC4_UNORM_BLOCK => &FormatCompatibilityInner::Class_BC4,
+ Self::BC4_SNORM_BLOCK => &FormatCompatibilityInner::Class_BC4,
+ Self::BC5_UNORM_BLOCK => &FormatCompatibilityInner::Class_BC5,
+ Self::BC5_SNORM_BLOCK => &FormatCompatibilityInner::Class_BC5,
+ Self::BC6H_UFLOAT_BLOCK => &FormatCompatibilityInner::Class_BC6H,
+ Self::BC6H_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_BC6H,
+ Self::BC7_UNORM_BLOCK => &FormatCompatibilityInner::Class_BC7,
+ Self::BC7_SRGB_BLOCK => &FormatCompatibilityInner::Class_BC7,
+ Self::ETC2_R8G8B8_UNORM_BLOCK => &FormatCompatibilityInner::Class_ETC2_RGB,
+ Self::ETC2_R8G8B8_SRGB_BLOCK => &FormatCompatibilityInner::Class_ETC2_RGB,
+ Self::ETC2_R8G8B8A1_UNORM_BLOCK => &FormatCompatibilityInner::Class_ETC2_RGBA,
+ Self::ETC2_R8G8B8A1_SRGB_BLOCK => &FormatCompatibilityInner::Class_ETC2_RGBA,
+ Self::ETC2_R8G8B8A8_UNORM_BLOCK => &FormatCompatibilityInner::Class_ETC2_EAC_RGBA,
+ Self::ETC2_R8G8B8A8_SRGB_BLOCK => &FormatCompatibilityInner::Class_ETC2_EAC_RGBA,
+ Self::EAC_R11_UNORM_BLOCK => &FormatCompatibilityInner::Class_EAC_R,
+ Self::EAC_R11_SNORM_BLOCK => &FormatCompatibilityInner::Class_EAC_R,
+ Self::EAC_R11G11_UNORM_BLOCK => &FormatCompatibilityInner::Class_EAC_RG,
+ Self::EAC_R11G11_SNORM_BLOCK => &FormatCompatibilityInner::Class_EAC_RG,
+ Self::ASTC_4x4_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_4x4,
+ Self::ASTC_4x4_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_4x4,
+ Self::ASTC_5x4_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_5x4,
+ Self::ASTC_5x4_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_5x4,
+ Self::ASTC_5x5_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_5x5,
+ Self::ASTC_5x5_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_5x5,
+ Self::ASTC_6x5_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_6x5,
+ Self::ASTC_6x5_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_6x5,
+ Self::ASTC_6x6_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_6x6,
+ Self::ASTC_6x6_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_6x6,
+ Self::ASTC_8x5_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_8x5,
+ Self::ASTC_8x5_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_8x5,
+ Self::ASTC_8x6_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_8x6,
+ Self::ASTC_8x6_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_8x6,
+ Self::ASTC_8x8_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_8x8,
+ Self::ASTC_8x8_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_8x8,
+ Self::ASTC_10x5_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_10x5,
+ Self::ASTC_10x5_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_10x5,
+ Self::ASTC_10x6_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_10x6,
+ Self::ASTC_10x6_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_10x6,
+ Self::ASTC_10x8_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_10x8,
+ Self::ASTC_10x8_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_10x8,
+ Self::ASTC_10x10_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_10x10,
+ Self::ASTC_10x10_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_10x10,
+ Self::ASTC_12x10_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_12x10,
+ Self::ASTC_12x10_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_12x10,
+ Self::ASTC_12x12_UNORM_BLOCK => &FormatCompatibilityInner::Class_ASTC_12x12,
+ Self::ASTC_12x12_SRGB_BLOCK => &FormatCompatibilityInner::Class_ASTC_12x12,
+ Self::G8B8G8R8_422_UNORM => &FormatCompatibilityInner::Class_32bit_G8B8G8R8,
+ Self::B8G8R8G8_422_UNORM => &FormatCompatibilityInner::Class_32bit_B8G8R8G8,
+ Self::G8_B8_R8_3PLANE_420_UNORM => &FormatCompatibilityInner::Class_8bit_3plane_420,
+ Self::G8_B8R8_2PLANE_420_UNORM => &FormatCompatibilityInner::Class_8bit_2plane_420,
+ Self::G8_B8_R8_3PLANE_422_UNORM => &FormatCompatibilityInner::Class_8bit_3plane_422,
+ Self::G8_B8R8_2PLANE_422_UNORM => &FormatCompatibilityInner::Class_8bit_2plane_422,
+ Self::G8_B8_R8_3PLANE_444_UNORM => &FormatCompatibilityInner::Class_8bit_3plane_444,
+ Self::R10X6_UNORM_PACK16 => &FormatCompatibilityInner::Class_16bit,
+ Self::R10X6G10X6_UNORM_2PACK16 => &FormatCompatibilityInner::Class_32bit,
+ Self::R10X6G10X6B10X6A10X6_UNORM_4PACK16 => {
+ &FormatCompatibilityInner::Class_64bit_R10G10B10A10
+ }
+ Self::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => {
+ &FormatCompatibilityInner::Class_64bit_G10B10G10R10
+ }
+ Self::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => {
+ &FormatCompatibilityInner::Class_64bit_B10G10R10G10
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => {
+ &FormatCompatibilityInner::Class_10bit_3plane_420
+ }
+ Self::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => {
+ &FormatCompatibilityInner::Class_10bit_2plane_420
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => {
+ &FormatCompatibilityInner::Class_10bit_3plane_422
+ }
+ Self::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => {
+ &FormatCompatibilityInner::Class_10bit_2plane_422
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 => {
+ &FormatCompatibilityInner::Class_10bit_3plane_444
+ }
+ Self::R12X4_UNORM_PACK16 => &FormatCompatibilityInner::Class_16bit,
+ Self::R12X4G12X4_UNORM_2PACK16 => &FormatCompatibilityInner::Class_32bit,
+ Self::R12X4G12X4B12X4A12X4_UNORM_4PACK16 => {
+ &FormatCompatibilityInner::Class_64bit_R12G12B12A12
+ }
+ Self::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => {
+ &FormatCompatibilityInner::Class_64bit_G12B12G12R12
+ }
+ Self::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => {
+ &FormatCompatibilityInner::Class_64bit_B12G12R12G12
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => {
+ &FormatCompatibilityInner::Class_12bit_3plane_420
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => {
+ &FormatCompatibilityInner::Class_12bit_2plane_420
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => {
+ &FormatCompatibilityInner::Class_12bit_3plane_422
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => {
+ &FormatCompatibilityInner::Class_12bit_2plane_422
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 => {
+ &FormatCompatibilityInner::Class_12bit_3plane_444
+ }
+ Self::G16B16G16R16_422_UNORM => &FormatCompatibilityInner::Class_64bit_G16B16G16R16,
+ Self::B16G16R16G16_422_UNORM => &FormatCompatibilityInner::Class_64bit_B16G16R16G16,
+ Self::G16_B16_R16_3PLANE_420_UNORM => &FormatCompatibilityInner::Class_16bit_3plane_420,
+ Self::G16_B16R16_2PLANE_420_UNORM => &FormatCompatibilityInner::Class_16bit_2plane_420,
+ Self::G16_B16_R16_3PLANE_422_UNORM => &FormatCompatibilityInner::Class_16bit_3plane_422,
+ Self::G16_B16R16_2PLANE_422_UNORM => &FormatCompatibilityInner::Class_16bit_2plane_422,
+ Self::G16_B16_R16_3PLANE_444_UNORM => &FormatCompatibilityInner::Class_16bit_3plane_444,
+ Self::PVRTC1_2BPP_UNORM_BLOCK => &FormatCompatibilityInner::Class_PVRTC1_2BPP,
+ Self::PVRTC1_4BPP_UNORM_BLOCK => &FormatCompatibilityInner::Class_PVRTC1_4BPP,
+ Self::PVRTC2_2BPP_UNORM_BLOCK => &FormatCompatibilityInner::Class_PVRTC2_2BPP,
+ Self::PVRTC2_4BPP_UNORM_BLOCK => &FormatCompatibilityInner::Class_PVRTC2_4BPP,
+ Self::PVRTC1_2BPP_SRGB_BLOCK => &FormatCompatibilityInner::Class_PVRTC1_2BPP,
+ Self::PVRTC1_4BPP_SRGB_BLOCK => &FormatCompatibilityInner::Class_PVRTC1_4BPP,
+ Self::PVRTC2_2BPP_SRGB_BLOCK => &FormatCompatibilityInner::Class_PVRTC2_2BPP,
+ Self::PVRTC2_4BPP_SRGB_BLOCK => &FormatCompatibilityInner::Class_PVRTC2_4BPP,
+ Self::ASTC_4x4_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_4x4,
+ Self::ASTC_5x4_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_5x4,
+ Self::ASTC_5x5_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_5x5,
+ Self::ASTC_6x5_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_6x5,
+ Self::ASTC_6x6_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_6x6,
+ Self::ASTC_8x5_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_8x5,
+ Self::ASTC_8x6_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_8x6,
+ Self::ASTC_8x8_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_8x8,
+ Self::ASTC_10x5_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_10x5,
+ Self::ASTC_10x6_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_10x6,
+ Self::ASTC_10x8_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_10x8,
+ Self::ASTC_10x10_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_10x10,
+ Self::ASTC_12x10_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_12x10,
+ Self::ASTC_12x12_SFLOAT_BLOCK => &FormatCompatibilityInner::Class_ASTC_12x12,
+ Self::G8_B8R8_2PLANE_444_UNORM => &FormatCompatibilityInner::Class_8bit_2plane_444,
+ Self::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 => {
+ &FormatCompatibilityInner::Class_10bit_2plane_444
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 => {
+ &FormatCompatibilityInner::Class_12bit_2plane_444
+ }
+ Self::G16_B16R16_2PLANE_444_UNORM => &FormatCompatibilityInner::Class_16bit_2plane_444,
+ Self::A4R4G4B4_UNORM_PACK16 => &FormatCompatibilityInner::Class_16bit,
+ Self::A4B4G4R4_UNORM_PACK16 => &FormatCompatibilityInner::Class_16bit,
+ Self::R16G16_S10_5_NV => &FormatCompatibilityInner::Class_32bit,
+ })
+ }
+ #[doc = r" Returns the number of bits per texel block that each component (R, G, B, A) is"]
+ #[doc = r" represented with. Components that are not present in the format have 0 bits."]
+ #[doc = r""]
+ #[doc = r" For depth/stencil formats, the depth component is the first, stencil the second. For"]
+ #[doc = r" multi-planar formats, this is the number of bits across all planes."]
+ #[doc = r""]
+ #[doc = r" For block-compressed formats, the number of bits in individual components is not"]
+ #[doc = r" well-defined, and the return value is merely binary: 1 indicates a component"]
+ #[doc = r" that is present in the format, 0 indicates one that is absent."]
+ pub fn components(self) -> [u8; 4] {
+ match self {
+ Self::R4G4_UNORM_PACK8 => [4, 4, 0, 0],
+ Self::R4G4B4A4_UNORM_PACK16 => [4, 4, 4, 4],
+ Self::B4G4R4A4_UNORM_PACK16 => [4, 4, 4, 4],
+ Self::R5G6B5_UNORM_PACK16 => [5, 6, 5, 0],
+ Self::B5G6R5_UNORM_PACK16 => [5, 6, 5, 0],
+ Self::R5G5B5A1_UNORM_PACK16 => [5, 5, 5, 1],
+ Self::B5G5R5A1_UNORM_PACK16 => [5, 5, 5, 1],
+ Self::A1R5G5B5_UNORM_PACK16 => [5, 5, 5, 1],
+ Self::R8_UNORM => [8, 0, 0, 0],
+ Self::R8_SNORM => [8, 0, 0, 0],
+ Self::R8_USCALED => [8, 0, 0, 0],
+ Self::R8_SSCALED => [8, 0, 0, 0],
+ Self::R8_UINT => [8, 0, 0, 0],
+ Self::R8_SINT => [8, 0, 0, 0],
+ Self::R8_SRGB => [8, 0, 0, 0],
+ Self::R8G8_UNORM => [8, 8, 0, 0],
+ Self::R8G8_SNORM => [8, 8, 0, 0],
+ Self::R8G8_USCALED => [8, 8, 0, 0],
+ Self::R8G8_SSCALED => [8, 8, 0, 0],
+ Self::R8G8_UINT => [8, 8, 0, 0],
+ Self::R8G8_SINT => [8, 8, 0, 0],
+ Self::R8G8_SRGB => [8, 8, 0, 0],
+ Self::R8G8B8_UNORM => [8, 8, 8, 0],
+ Self::R8G8B8_SNORM => [8, 8, 8, 0],
+ Self::R8G8B8_USCALED => [8, 8, 8, 0],
+ Self::R8G8B8_SSCALED => [8, 8, 8, 0],
+ Self::R8G8B8_UINT => [8, 8, 8, 0],
+ Self::R8G8B8_SINT => [8, 8, 8, 0],
+ Self::R8G8B8_SRGB => [8, 8, 8, 0],
+ Self::B8G8R8_UNORM => [8, 8, 8, 0],
+ Self::B8G8R8_SNORM => [8, 8, 8, 0],
+ Self::B8G8R8_USCALED => [8, 8, 8, 0],
+ Self::B8G8R8_SSCALED => [8, 8, 8, 0],
+ Self::B8G8R8_UINT => [8, 8, 8, 0],
+ Self::B8G8R8_SINT => [8, 8, 8, 0],
+ Self::B8G8R8_SRGB => [8, 8, 8, 0],
+ Self::R8G8B8A8_UNORM => [8, 8, 8, 8],
+ Self::R8G8B8A8_SNORM => [8, 8, 8, 8],
+ Self::R8G8B8A8_USCALED => [8, 8, 8, 8],
+ Self::R8G8B8A8_SSCALED => [8, 8, 8, 8],
+ Self::R8G8B8A8_UINT => [8, 8, 8, 8],
+ Self::R8G8B8A8_SINT => [8, 8, 8, 8],
+ Self::R8G8B8A8_SRGB => [8, 8, 8, 8],
+ Self::B8G8R8A8_UNORM => [8, 8, 8, 8],
+ Self::B8G8R8A8_SNORM => [8, 8, 8, 8],
+ Self::B8G8R8A8_USCALED => [8, 8, 8, 8],
+ Self::B8G8R8A8_SSCALED => [8, 8, 8, 8],
+ Self::B8G8R8A8_UINT => [8, 8, 8, 8],
+ Self::B8G8R8A8_SINT => [8, 8, 8, 8],
+ Self::B8G8R8A8_SRGB => [8, 8, 8, 8],
+ Self::A8B8G8R8_UNORM_PACK32 => [8, 8, 8, 8],
+ Self::A8B8G8R8_SNORM_PACK32 => [8, 8, 8, 8],
+ Self::A8B8G8R8_USCALED_PACK32 => [8, 8, 8, 8],
+ Self::A8B8G8R8_SSCALED_PACK32 => [8, 8, 8, 8],
+ Self::A8B8G8R8_UINT_PACK32 => [8, 8, 8, 8],
+ Self::A8B8G8R8_SINT_PACK32 => [8, 8, 8, 8],
+ Self::A8B8G8R8_SRGB_PACK32 => [8, 8, 8, 8],
+ Self::A2R10G10B10_UNORM_PACK32 => [10, 10, 10, 2],
+ Self::A2R10G10B10_SNORM_PACK32 => [10, 10, 10, 2],
+ Self::A2R10G10B10_USCALED_PACK32 => [10, 10, 10, 2],
+ Self::A2R10G10B10_SSCALED_PACK32 => [10, 10, 10, 2],
+ Self::A2R10G10B10_UINT_PACK32 => [10, 10, 10, 2],
+ Self::A2R10G10B10_SINT_PACK32 => [10, 10, 10, 2],
+ Self::A2B10G10R10_UNORM_PACK32 => [10, 10, 10, 2],
+ Self::A2B10G10R10_SNORM_PACK32 => [10, 10, 10, 2],
+ Self::A2B10G10R10_USCALED_PACK32 => [10, 10, 10, 2],
+ Self::A2B10G10R10_SSCALED_PACK32 => [10, 10, 10, 2],
+ Self::A2B10G10R10_UINT_PACK32 => [10, 10, 10, 2],
+ Self::A2B10G10R10_SINT_PACK32 => [10, 10, 10, 2],
+ Self::R16_UNORM => [16, 0, 0, 0],
+ Self::R16_SNORM => [16, 0, 0, 0],
+ Self::R16_USCALED => [16, 0, 0, 0],
+ Self::R16_SSCALED => [16, 0, 0, 0],
+ Self::R16_UINT => [16, 0, 0, 0],
+ Self::R16_SINT => [16, 0, 0, 0],
+ Self::R16_SFLOAT => [16, 0, 0, 0],
+ Self::R16G16_UNORM => [16, 16, 0, 0],
+ Self::R16G16_SNORM => [16, 16, 0, 0],
+ Self::R16G16_USCALED => [16, 16, 0, 0],
+ Self::R16G16_SSCALED => [16, 16, 0, 0],
+ Self::R16G16_UINT => [16, 16, 0, 0],
+ Self::R16G16_SINT => [16, 16, 0, 0],
+ Self::R16G16_SFLOAT => [16, 16, 0, 0],
+ Self::R16G16B16_UNORM => [16, 16, 16, 0],
+ Self::R16G16B16_SNORM => [16, 16, 16, 0],
+ Self::R16G16B16_USCALED => [16, 16, 16, 0],
+ Self::R16G16B16_SSCALED => [16, 16, 16, 0],
+ Self::R16G16B16_UINT => [16, 16, 16, 0],
+ Self::R16G16B16_SINT => [16, 16, 16, 0],
+ Self::R16G16B16_SFLOAT => [16, 16, 16, 0],
+ Self::R16G16B16A16_UNORM => [16, 16, 16, 16],
+ Self::R16G16B16A16_SNORM => [16, 16, 16, 16],
+ Self::R16G16B16A16_USCALED => [16, 16, 16, 16],
+ Self::R16G16B16A16_SSCALED => [16, 16, 16, 16],
+ Self::R16G16B16A16_UINT => [16, 16, 16, 16],
+ Self::R16G16B16A16_SINT => [16, 16, 16, 16],
+ Self::R16G16B16A16_SFLOAT => [16, 16, 16, 16],
+ Self::R32_UINT => [32, 0, 0, 0],
+ Self::R32_SINT => [32, 0, 0, 0],
+ Self::R32_SFLOAT => [32, 0, 0, 0],
+ Self::R32G32_UINT => [32, 32, 0, 0],
+ Self::R32G32_SINT => [32, 32, 0, 0],
+ Self::R32G32_SFLOAT => [32, 32, 0, 0],
+ Self::R32G32B32_UINT => [32, 32, 32, 0],
+ Self::R32G32B32_SINT => [32, 32, 32, 0],
+ Self::R32G32B32_SFLOAT => [32, 32, 32, 0],
+ Self::R32G32B32A32_UINT => [32, 32, 32, 32],
+ Self::R32G32B32A32_SINT => [32, 32, 32, 32],
+ Self::R32G32B32A32_SFLOAT => [32, 32, 32, 32],
+ Self::R64_UINT => [64, 0, 0, 0],
+ Self::R64_SINT => [64, 0, 0, 0],
+ Self::R64_SFLOAT => [64, 0, 0, 0],
+ Self::R64G64_UINT => [64, 0, 64, 0],
+ Self::R64G64_SINT => [64, 0, 64, 0],
+ Self::R64G64_SFLOAT => [64, 0, 64, 0],
+ Self::R64G64B64_UINT => [64, 64, 64, 0],
+ Self::R64G64B64_SINT => [64, 64, 64, 0],
+ Self::R64G64B64_SFLOAT => [64, 64, 64, 0],
+ Self::R64G64B64A64_UINT => [64, 64, 64, 64],
+ Self::R64G64B64A64_SINT => [64, 64, 64, 64],
+ Self::R64G64B64A64_SFLOAT => [64, 64, 64, 64],
+ Self::B10G11R11_UFLOAT_PACK32 => [10, 11, 10, 0],
+ Self::E5B9G9R9_UFLOAT_PACK32 => [9, 9, 9, 0],
+ Self::D16_UNORM => [16, 0, 0, 0],
+ Self::X8_D24_UNORM_PACK32 => [24, 0, 0, 0],
+ Self::D32_SFLOAT => [32, 0, 0, 0],
+ Self::S8_UINT => [0, 8, 0, 0],
+ Self::D16_UNORM_S8_UINT => [16, 8, 0, 0],
+ Self::D24_UNORM_S8_UINT => [24, 8, 0, 0],
+ Self::D32_SFLOAT_S8_UINT => [32, 8, 0, 0],
+ Self::BC1_RGB_UNORM_BLOCK => [1, 1, 1, 0],
+ Self::BC1_RGB_SRGB_BLOCK => [1, 1, 1, 0],
+ Self::BC1_RGBA_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::BC1_RGBA_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::BC2_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::BC2_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::BC3_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::BC3_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::BC4_UNORM_BLOCK => [1, 0, 0, 0],
+ Self::BC4_SNORM_BLOCK => [1, 0, 0, 0],
+ Self::BC5_UNORM_BLOCK => [1, 1, 0, 0],
+ Self::BC5_SNORM_BLOCK => [1, 1, 0, 0],
+ Self::BC6H_UFLOAT_BLOCK => [1, 1, 1, 0],
+ Self::BC6H_SFLOAT_BLOCK => [1, 1, 1, 0],
+ Self::BC7_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::BC7_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ETC2_R8G8B8_UNORM_BLOCK => [1, 1, 1, 0],
+ Self::ETC2_R8G8B8_SRGB_BLOCK => [1, 1, 1, 0],
+ Self::ETC2_R8G8B8A1_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ETC2_R8G8B8A1_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ETC2_R8G8B8A8_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ETC2_R8G8B8A8_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::EAC_R11_UNORM_BLOCK => [11, 0, 0, 0],
+ Self::EAC_R11_SNORM_BLOCK => [11, 0, 0, 0],
+ Self::EAC_R11G11_UNORM_BLOCK => [11, 11, 0, 0],
+ Self::EAC_R11G11_SNORM_BLOCK => [11, 11, 0, 0],
+ Self::ASTC_4x4_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_4x4_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_5x4_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_5x4_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_5x5_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_5x5_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_6x5_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_6x5_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_6x6_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_6x6_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_8x5_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_8x5_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_8x6_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_8x6_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_8x8_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_8x8_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_10x5_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_10x5_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_10x6_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_10x6_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_10x8_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_10x8_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_10x10_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_10x10_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_12x10_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_12x10_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_12x12_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_12x12_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::G8B8G8R8_422_UNORM => [8, 16, 8, 0],
+ Self::B8G8R8G8_422_UNORM => [8, 16, 8, 0],
+ Self::G8_B8_R8_3PLANE_420_UNORM => [8, 8, 8, 0],
+ Self::G8_B8R8_2PLANE_420_UNORM => [8, 8, 8, 0],
+ Self::G8_B8_R8_3PLANE_422_UNORM => [8, 8, 8, 0],
+ Self::G8_B8R8_2PLANE_422_UNORM => [8, 8, 8, 0],
+ Self::G8_B8_R8_3PLANE_444_UNORM => [8, 8, 8, 0],
+ Self::R10X6_UNORM_PACK16 => [10, 0, 0, 0],
+ Self::R10X6G10X6_UNORM_2PACK16 => [10, 10, 0, 0],
+ Self::R10X6G10X6B10X6A10X6_UNORM_4PACK16 => [10, 10, 10, 10],
+ Self::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => [10, 20, 10, 0],
+ Self::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => [10, 20, 10, 0],
+ Self::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => [10, 10, 10, 0],
+ Self::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => [10, 10, 10, 0],
+ Self::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => [10, 10, 10, 0],
+ Self::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => [10, 10, 10, 0],
+ Self::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 => [10, 10, 10, 0],
+ Self::R12X4_UNORM_PACK16 => [12, 0, 0, 0],
+ Self::R12X4G12X4_UNORM_2PACK16 => [12, 12, 0, 0],
+ Self::R12X4G12X4B12X4A12X4_UNORM_4PACK16 => [12, 12, 12, 12],
+ Self::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => [12, 24, 12, 0],
+ Self::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => [12, 24, 12, 0],
+ Self::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => [12, 12, 12, 0],
+ Self::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => [12, 12, 12, 0],
+ Self::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => [12, 12, 12, 0],
+ Self::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => [12, 12, 12, 0],
+ Self::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 => [12, 12, 12, 0],
+ Self::G16B16G16R16_422_UNORM => [16, 32, 16, 0],
+ Self::B16G16R16G16_422_UNORM => [16, 32, 16, 0],
+ Self::G16_B16_R16_3PLANE_420_UNORM => [16, 16, 16, 0],
+ Self::G16_B16R16_2PLANE_420_UNORM => [16, 16, 16, 0],
+ Self::G16_B16_R16_3PLANE_422_UNORM => [16, 16, 16, 0],
+ Self::G16_B16R16_2PLANE_422_UNORM => [16, 16, 16, 0],
+ Self::G16_B16_R16_3PLANE_444_UNORM => [16, 16, 16, 0],
+ Self::PVRTC1_2BPP_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::PVRTC1_4BPP_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::PVRTC2_2BPP_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::PVRTC2_4BPP_UNORM_BLOCK => [1, 1, 1, 1],
+ Self::PVRTC1_2BPP_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::PVRTC1_4BPP_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::PVRTC2_2BPP_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::PVRTC2_4BPP_SRGB_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_4x4_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_5x4_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_5x5_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_6x5_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_6x6_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_8x5_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_8x6_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_8x8_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_10x5_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_10x6_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_10x8_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_10x10_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_12x10_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::ASTC_12x12_SFLOAT_BLOCK => [1, 1, 1, 1],
+ Self::G8_B8R8_2PLANE_444_UNORM => [8, 8, 8, 0],
+ Self::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 => [10, 10, 10, 0],
+ Self::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 => [12, 12, 12, 0],
+ Self::G16_B16R16_2PLANE_444_UNORM => [16, 16, 16, 0],
+ Self::A4R4G4B4_UNORM_PACK16 => [4, 4, 4, 4],
+ Self::A4B4G4R4_UNORM_PACK16 => [4, 4, 4, 4],
+ Self::R16G16_S10_5_NV => [16, 16, 0, 0],
+ }
+ }
+ #[doc = r" Returns the block compression scheme used for this format, if any. Returns `None` if"]
+ #[doc = r" the format does not use compression."]
+ pub fn compression(self) -> Option<CompressionType> {
+ match self {
+ Self::BC1_RGB_UNORM_BLOCK => Some(CompressionType::BC),
+ Self::BC1_RGB_SRGB_BLOCK => Some(CompressionType::BC),
+ Self::BC1_RGBA_UNORM_BLOCK => Some(CompressionType::BC),
+ Self::BC1_RGBA_SRGB_BLOCK => Some(CompressionType::BC),
+ Self::BC2_UNORM_BLOCK => Some(CompressionType::BC),
+ Self::BC2_SRGB_BLOCK => Some(CompressionType::BC),
+ Self::BC3_UNORM_BLOCK => Some(CompressionType::BC),
+ Self::BC3_SRGB_BLOCK => Some(CompressionType::BC),
+ Self::BC4_UNORM_BLOCK => Some(CompressionType::BC),
+ Self::BC4_SNORM_BLOCK => Some(CompressionType::BC),
+ Self::BC5_UNORM_BLOCK => Some(CompressionType::BC),
+ Self::BC5_SNORM_BLOCK => Some(CompressionType::BC),
+ Self::BC6H_UFLOAT_BLOCK => Some(CompressionType::BC),
+ Self::BC6H_SFLOAT_BLOCK => Some(CompressionType::BC),
+ Self::BC7_UNORM_BLOCK => Some(CompressionType::BC),
+ Self::BC7_SRGB_BLOCK => Some(CompressionType::BC),
+ Self::ETC2_R8G8B8_UNORM_BLOCK => Some(CompressionType::ETC2),
+ Self::ETC2_R8G8B8_SRGB_BLOCK => Some(CompressionType::ETC2),
+ Self::ETC2_R8G8B8A1_UNORM_BLOCK => Some(CompressionType::ETC2),
+ Self::ETC2_R8G8B8A1_SRGB_BLOCK => Some(CompressionType::ETC2),
+ Self::ETC2_R8G8B8A8_UNORM_BLOCK => Some(CompressionType::ETC2),
+ Self::ETC2_R8G8B8A8_SRGB_BLOCK => Some(CompressionType::ETC2),
+ Self::EAC_R11_UNORM_BLOCK => Some(CompressionType::EAC),
+ Self::EAC_R11_SNORM_BLOCK => Some(CompressionType::EAC),
+ Self::EAC_R11G11_UNORM_BLOCK => Some(CompressionType::EAC),
+ Self::EAC_R11G11_SNORM_BLOCK => Some(CompressionType::EAC),
+ Self::ASTC_4x4_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_4x4_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_5x4_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_5x4_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_5x5_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_5x5_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_6x5_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_6x5_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_6x6_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_6x6_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_8x5_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_8x5_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_8x6_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_8x6_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_8x8_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_8x8_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_10x5_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_10x5_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_10x6_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_10x6_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_10x8_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_10x8_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_10x10_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_10x10_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_12x10_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_12x10_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_12x12_UNORM_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::ASTC_12x12_SRGB_BLOCK => Some(CompressionType::ASTC_LDR),
+ Self::PVRTC1_2BPP_UNORM_BLOCK => Some(CompressionType::PVRTC),
+ Self::PVRTC1_4BPP_UNORM_BLOCK => Some(CompressionType::PVRTC),
+ Self::PVRTC2_2BPP_UNORM_BLOCK => Some(CompressionType::PVRTC),
+ Self::PVRTC2_4BPP_UNORM_BLOCK => Some(CompressionType::PVRTC),
+ Self::PVRTC1_2BPP_SRGB_BLOCK => Some(CompressionType::PVRTC),
+ Self::PVRTC1_4BPP_SRGB_BLOCK => Some(CompressionType::PVRTC),
+ Self::PVRTC2_2BPP_SRGB_BLOCK => Some(CompressionType::PVRTC),
+ Self::PVRTC2_4BPP_SRGB_BLOCK => Some(CompressionType::PVRTC),
+ Self::ASTC_4x4_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_5x4_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_5x5_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_6x5_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_6x6_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_8x5_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_8x6_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_8x8_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_10x5_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_10x6_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_10x8_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_10x10_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_12x10_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ Self::ASTC_12x12_SFLOAT_BLOCK => Some(CompressionType::ASTC_HDR),
+ _ => None,
+ }
+ }
+ #[doc = r" For multi-planar formats, returns a slice of length 2 or 3, containing the"]
+ #[doc = r" equivalent regular format of each plane."]
+ #[doc = r""]
+ #[doc = r" For non-planar formats, returns the empty slice."]
+ pub fn planes(self) -> &'static [Self] {
+ match self {
+ Self::G8_B8_R8_3PLANE_420_UNORM => &[Self::R8_UNORM, Self::R8_UNORM, Self::R8_UNORM],
+ Self::G8_B8R8_2PLANE_420_UNORM => &[Self::R8_UNORM, Self::R8G8_UNORM],
+ Self::G8_B8_R8_3PLANE_422_UNORM => &[Self::R8_UNORM, Self::R8_UNORM, Self::R8_UNORM],
+ Self::G8_B8R8_2PLANE_422_UNORM => &[Self::R8_UNORM, Self::R8G8_UNORM],
+ Self::G8_B8_R8_3PLANE_444_UNORM => &[Self::R8_UNORM, Self::R8_UNORM, Self::R8_UNORM],
+ Self::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => &[
+ Self::R10X6_UNORM_PACK16,
+ Self::R10X6_UNORM_PACK16,
+ Self::R10X6_UNORM_PACK16,
+ ],
+ Self::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => {
+ &[Self::R10X6_UNORM_PACK16, Self::R10X6G10X6_UNORM_2PACK16]
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => &[
+ Self::R10X6_UNORM_PACK16,
+ Self::R10X6_UNORM_PACK16,
+ Self::R10X6_UNORM_PACK16,
+ ],
+ Self::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => {
+ &[Self::R10X6_UNORM_PACK16, Self::R10X6G10X6_UNORM_2PACK16]
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 => &[
+ Self::R10X6_UNORM_PACK16,
+ Self::R10X6_UNORM_PACK16,
+ Self::R10X6_UNORM_PACK16,
+ ],
+ Self::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => &[
+ Self::R12X4_UNORM_PACK16,
+ Self::R12X4_UNORM_PACK16,
+ Self::R12X4_UNORM_PACK16,
+ ],
+ Self::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => {
+ &[Self::R12X4_UNORM_PACK16, Self::R12X4G12X4_UNORM_2PACK16]
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => &[
+ Self::R12X4_UNORM_PACK16,
+ Self::R12X4_UNORM_PACK16,
+ Self::R12X4_UNORM_PACK16,
+ ],
+ Self::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => {
+ &[Self::R12X4_UNORM_PACK16, Self::R12X4G12X4_UNORM_2PACK16]
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 => &[
+ Self::R12X4_UNORM_PACK16,
+ Self::R12X4_UNORM_PACK16,
+ Self::R12X4_UNORM_PACK16,
+ ],
+ Self::G16_B16_R16_3PLANE_420_UNORM => {
+ &[Self::R16_UNORM, Self::R16_UNORM, Self::R16_UNORM]
+ }
+ Self::G16_B16R16_2PLANE_420_UNORM => &[Self::R16_UNORM, Self::R16G16_UNORM],
+ Self::G16_B16_R16_3PLANE_422_UNORM => {
+ &[Self::R16_UNORM, Self::R16_UNORM, Self::R16_UNORM]
+ }
+ Self::G16_B16R16_2PLANE_422_UNORM => &[Self::R16_UNORM, Self::R16G16_UNORM],
+ Self::G16_B16_R16_3PLANE_444_UNORM => {
+ &[Self::R16_UNORM, Self::R16_UNORM, Self::R16_UNORM]
+ }
+ Self::G8_B8R8_2PLANE_444_UNORM => &[Self::R8_UNORM, Self::R8G8_UNORM],
+ Self::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 => {
+ &[Self::R10X6_UNORM_PACK16, Self::R10X6G10X6_UNORM_2PACK16]
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 => {
+ &[Self::R12X4_UNORM_PACK16, Self::R12X4G12X4_UNORM_2PACK16]
+ }
+ Self::G16_B16R16_2PLANE_444_UNORM => &[Self::R16_UNORM, Self::R16G16_UNORM],
+ _ => &[],
+ }
+ }
+ #[doc = r" Returns the number of texels for a single texel block. For most formats, this is"]
+ #[doc = r" the product of the `block_extent` elements, but for some it differs."]
+ pub fn texels_per_block(self) -> u8 {
+ match self {
+ Self::BC1_RGB_UNORM_BLOCK => 16,
+ Self::BC1_RGB_SRGB_BLOCK => 16,
+ Self::BC1_RGBA_UNORM_BLOCK => 16,
+ Self::BC1_RGBA_SRGB_BLOCK => 16,
+ Self::BC2_UNORM_BLOCK => 16,
+ Self::BC2_SRGB_BLOCK => 16,
+ Self::BC3_UNORM_BLOCK => 16,
+ Self::BC3_SRGB_BLOCK => 16,
+ Self::BC4_UNORM_BLOCK => 16,
+ Self::BC4_SNORM_BLOCK => 16,
+ Self::BC5_UNORM_BLOCK => 16,
+ Self::BC5_SNORM_BLOCK => 16,
+ Self::BC6H_UFLOAT_BLOCK => 16,
+ Self::BC6H_SFLOAT_BLOCK => 16,
+ Self::BC7_UNORM_BLOCK => 16,
+ Self::BC7_SRGB_BLOCK => 16,
+ Self::ETC2_R8G8B8_UNORM_BLOCK => 16,
+ Self::ETC2_R8G8B8_SRGB_BLOCK => 16,
+ Self::ETC2_R8G8B8A1_UNORM_BLOCK => 16,
+ Self::ETC2_R8G8B8A1_SRGB_BLOCK => 16,
+ Self::ETC2_R8G8B8A8_UNORM_BLOCK => 16,
+ Self::ETC2_R8G8B8A8_SRGB_BLOCK => 16,
+ Self::EAC_R11_UNORM_BLOCK => 16,
+ Self::EAC_R11_SNORM_BLOCK => 16,
+ Self::EAC_R11G11_UNORM_BLOCK => 16,
+ Self::EAC_R11G11_SNORM_BLOCK => 16,
+ Self::ASTC_4x4_UNORM_BLOCK => 16,
+ Self::ASTC_4x4_SRGB_BLOCK => 16,
+ Self::ASTC_5x4_UNORM_BLOCK => 20,
+ Self::ASTC_5x4_SRGB_BLOCK => 20,
+ Self::ASTC_5x5_UNORM_BLOCK => 25,
+ Self::ASTC_5x5_SRGB_BLOCK => 25,
+ Self::ASTC_6x5_UNORM_BLOCK => 30,
+ Self::ASTC_6x5_SRGB_BLOCK => 30,
+ Self::ASTC_6x6_UNORM_BLOCK => 36,
+ Self::ASTC_6x6_SRGB_BLOCK => 36,
+ Self::ASTC_8x5_UNORM_BLOCK => 40,
+ Self::ASTC_8x5_SRGB_BLOCK => 40,
+ Self::ASTC_8x6_UNORM_BLOCK => 48,
+ Self::ASTC_8x6_SRGB_BLOCK => 48,
+ Self::ASTC_8x8_UNORM_BLOCK => 64,
+ Self::ASTC_8x8_SRGB_BLOCK => 64,
+ Self::ASTC_10x5_UNORM_BLOCK => 50,
+ Self::ASTC_10x5_SRGB_BLOCK => 50,
+ Self::ASTC_10x6_UNORM_BLOCK => 60,
+ Self::ASTC_10x6_SRGB_BLOCK => 60,
+ Self::ASTC_10x8_UNORM_BLOCK => 80,
+ Self::ASTC_10x8_SRGB_BLOCK => 80,
+ Self::ASTC_10x10_UNORM_BLOCK => 100,
+ Self::ASTC_10x10_SRGB_BLOCK => 100,
+ Self::ASTC_12x10_UNORM_BLOCK => 120,
+ Self::ASTC_12x10_SRGB_BLOCK => 120,
+ Self::ASTC_12x12_UNORM_BLOCK => 144,
+ Self::ASTC_12x12_SRGB_BLOCK => 144,
+ Self::ASTC_4x4_SFLOAT_BLOCK => 16,
+ Self::ASTC_5x4_SFLOAT_BLOCK => 20,
+ Self::ASTC_5x5_SFLOAT_BLOCK => 25,
+ Self::ASTC_6x5_SFLOAT_BLOCK => 30,
+ Self::ASTC_6x6_SFLOAT_BLOCK => 36,
+ Self::ASTC_8x5_SFLOAT_BLOCK => 40,
+ Self::ASTC_8x6_SFLOAT_BLOCK => 48,
+ Self::ASTC_8x8_SFLOAT_BLOCK => 64,
+ Self::ASTC_10x5_SFLOAT_BLOCK => 50,
+ Self::ASTC_10x6_SFLOAT_BLOCK => 60,
+ Self::ASTC_10x8_SFLOAT_BLOCK => 80,
+ Self::ASTC_10x10_SFLOAT_BLOCK => 100,
+ Self::ASTC_12x10_SFLOAT_BLOCK => 120,
+ Self::ASTC_12x12_SFLOAT_BLOCK => 144,
+ _ => 1,
+ }
+ }
+ #[doc = r" Returns the numeric data type of the color aspect of this format. Returns `None`"]
+ #[doc = r" for depth/stencil formats."]
+ pub fn type_color(self) -> Option<NumericType> {
+ match self {
+ Self::R4G4_UNORM_PACK8 => Some(NumericType::UNORM),
+ Self::R4G4B4A4_UNORM_PACK16 => Some(NumericType::UNORM),
+ Self::B4G4R4A4_UNORM_PACK16 => Some(NumericType::UNORM),
+ Self::R5G6B5_UNORM_PACK16 => Some(NumericType::UNORM),
+ Self::B5G6R5_UNORM_PACK16 => Some(NumericType::UNORM),
+ Self::R5G5B5A1_UNORM_PACK16 => Some(NumericType::UNORM),
+ Self::B5G5R5A1_UNORM_PACK16 => Some(NumericType::UNORM),
+ Self::A1R5G5B5_UNORM_PACK16 => Some(NumericType::UNORM),
+ Self::R8_UNORM => Some(NumericType::UNORM),
+ Self::R8_SNORM => Some(NumericType::SNORM),
+ Self::R8_USCALED => Some(NumericType::USCALED),
+ Self::R8_SSCALED => Some(NumericType::SSCALED),
+ Self::R8_UINT => Some(NumericType::UINT),
+ Self::R8_SINT => Some(NumericType::SINT),
+ Self::R8_SRGB => Some(NumericType::SRGB),
+ Self::R8G8_UNORM => Some(NumericType::UNORM),
+ Self::R8G8_SNORM => Some(NumericType::SNORM),
+ Self::R8G8_USCALED => Some(NumericType::USCALED),
+ Self::R8G8_SSCALED => Some(NumericType::SSCALED),
+ Self::R8G8_UINT => Some(NumericType::UINT),
+ Self::R8G8_SINT => Some(NumericType::SINT),
+ Self::R8G8_SRGB => Some(NumericType::SRGB),
+ Self::R8G8B8_UNORM => Some(NumericType::UNORM),
+ Self::R8G8B8_SNORM => Some(NumericType::SNORM),
+ Self::R8G8B8_USCALED => Some(NumericType::USCALED),
+ Self::R8G8B8_SSCALED => Some(NumericType::SSCALED),
+ Self::R8G8B8_UINT => Some(NumericType::UINT),
+ Self::R8G8B8_SINT => Some(NumericType::SINT),
+ Self::R8G8B8_SRGB => Some(NumericType::SRGB),
+ Self::B8G8R8_UNORM => Some(NumericType::UNORM),
+ Self::B8G8R8_SNORM => Some(NumericType::SNORM),
+ Self::B8G8R8_USCALED => Some(NumericType::USCALED),
+ Self::B8G8R8_SSCALED => Some(NumericType::SSCALED),
+ Self::B8G8R8_UINT => Some(NumericType::UINT),
+ Self::B8G8R8_SINT => Some(NumericType::SINT),
+ Self::B8G8R8_SRGB => Some(NumericType::SRGB),
+ Self::R8G8B8A8_UNORM => Some(NumericType::UNORM),
+ Self::R8G8B8A8_SNORM => Some(NumericType::SNORM),
+ Self::R8G8B8A8_USCALED => Some(NumericType::USCALED),
+ Self::R8G8B8A8_SSCALED => Some(NumericType::SSCALED),
+ Self::R8G8B8A8_UINT => Some(NumericType::UINT),
+ Self::R8G8B8A8_SINT => Some(NumericType::SINT),
+ Self::R8G8B8A8_SRGB => Some(NumericType::SRGB),
+ Self::B8G8R8A8_UNORM => Some(NumericType::UNORM),
+ Self::B8G8R8A8_SNORM => Some(NumericType::SNORM),
+ Self::B8G8R8A8_USCALED => Some(NumericType::USCALED),
+ Self::B8G8R8A8_SSCALED => Some(NumericType::SSCALED),
+ Self::B8G8R8A8_UINT => Some(NumericType::UINT),
+ Self::B8G8R8A8_SINT => Some(NumericType::SINT),
+ Self::B8G8R8A8_SRGB => Some(NumericType::SRGB),
+ Self::A8B8G8R8_UNORM_PACK32 => Some(NumericType::UNORM),
+ Self::A8B8G8R8_SNORM_PACK32 => Some(NumericType::SNORM),
+ Self::A8B8G8R8_USCALED_PACK32 => Some(NumericType::USCALED),
+ Self::A8B8G8R8_SSCALED_PACK32 => Some(NumericType::SSCALED),
+ Self::A8B8G8R8_UINT_PACK32 => Some(NumericType::UINT),
+ Self::A8B8G8R8_SINT_PACK32 => Some(NumericType::SINT),
+ Self::A8B8G8R8_SRGB_PACK32 => Some(NumericType::SRGB),
+ Self::A2R10G10B10_UNORM_PACK32 => Some(NumericType::UNORM),
+ Self::A2R10G10B10_SNORM_PACK32 => Some(NumericType::SNORM),
+ Self::A2R10G10B10_USCALED_PACK32 => Some(NumericType::USCALED),
+ Self::A2R10G10B10_SSCALED_PACK32 => Some(NumericType::SSCALED),
+ Self::A2R10G10B10_UINT_PACK32 => Some(NumericType::UINT),
+ Self::A2R10G10B10_SINT_PACK32 => Some(NumericType::SINT),
+ Self::A2B10G10R10_UNORM_PACK32 => Some(NumericType::UNORM),
+ Self::A2B10G10R10_SNORM_PACK32 => Some(NumericType::SNORM),
+ Self::A2B10G10R10_USCALED_PACK32 => Some(NumericType::USCALED),
+ Self::A2B10G10R10_SSCALED_PACK32 => Some(NumericType::SSCALED),
+ Self::A2B10G10R10_UINT_PACK32 => Some(NumericType::UINT),
+ Self::A2B10G10R10_SINT_PACK32 => Some(NumericType::SINT),
+ Self::R16_UNORM => Some(NumericType::UNORM),
+ Self::R16_SNORM => Some(NumericType::SNORM),
+ Self::R16_USCALED => Some(NumericType::USCALED),
+ Self::R16_SSCALED => Some(NumericType::SSCALED),
+ Self::R16_UINT => Some(NumericType::UINT),
+ Self::R16_SINT => Some(NumericType::SINT),
+ Self::R16_SFLOAT => Some(NumericType::SFLOAT),
+ Self::R16G16_UNORM => Some(NumericType::UNORM),
+ Self::R16G16_SNORM => Some(NumericType::SNORM),
+ Self::R16G16_USCALED => Some(NumericType::USCALED),
+ Self::R16G16_SSCALED => Some(NumericType::SSCALED),
+ Self::R16G16_UINT => Some(NumericType::UINT),
+ Self::R16G16_SINT => Some(NumericType::SINT),
+ Self::R16G16_SFLOAT => Some(NumericType::SFLOAT),
+ Self::R16G16B16_UNORM => Some(NumericType::UNORM),
+ Self::R16G16B16_SNORM => Some(NumericType::SNORM),
+ Self::R16G16B16_USCALED => Some(NumericType::USCALED),
+ Self::R16G16B16_SSCALED => Some(NumericType::SSCALED),
+ Self::R16G16B16_UINT => Some(NumericType::UINT),
+ Self::R16G16B16_SINT => Some(NumericType::SINT),
+ Self::R16G16B16_SFLOAT => Some(NumericType::SFLOAT),
+ Self::R16G16B16A16_UNORM => Some(NumericType::UNORM),
+ Self::R16G16B16A16_SNORM => Some(NumericType::SNORM),
+ Self::R16G16B16A16_USCALED => Some(NumericType::USCALED),
+ Self::R16G16B16A16_SSCALED => Some(NumericType::SSCALED),
+ Self::R16G16B16A16_UINT => Some(NumericType::UINT),
+ Self::R16G16B16A16_SINT => Some(NumericType::SINT),
+ Self::R16G16B16A16_SFLOAT => Some(NumericType::SFLOAT),
+ Self::R32_UINT => Some(NumericType::UINT),
+ Self::R32_SINT => Some(NumericType::SINT),
+ Self::R32_SFLOAT => Some(NumericType::SFLOAT),
+ Self::R32G32_UINT => Some(NumericType::UINT),
+ Self::R32G32_SINT => Some(NumericType::SINT),
+ Self::R32G32_SFLOAT => Some(NumericType::SFLOAT),
+ Self::R32G32B32_UINT => Some(NumericType::UINT),
+ Self::R32G32B32_SINT => Some(NumericType::SINT),
+ Self::R32G32B32_SFLOAT => Some(NumericType::SFLOAT),
+ Self::R32G32B32A32_UINT => Some(NumericType::UINT),
+ Self::R32G32B32A32_SINT => Some(NumericType::SINT),
+ Self::R32G32B32A32_SFLOAT => Some(NumericType::SFLOAT),
+ Self::R64_UINT => Some(NumericType::UINT),
+ Self::R64_SINT => Some(NumericType::SINT),
+ Self::R64_SFLOAT => Some(NumericType::SFLOAT),
+ Self::R64G64_UINT => Some(NumericType::UINT),
+ Self::R64G64_SINT => Some(NumericType::SINT),
+ Self::R64G64_SFLOAT => Some(NumericType::SFLOAT),
+ Self::R64G64B64_UINT => Some(NumericType::UINT),
+ Self::R64G64B64_SINT => Some(NumericType::SINT),
+ Self::R64G64B64_SFLOAT => Some(NumericType::SFLOAT),
+ Self::R64G64B64A64_UINT => Some(NumericType::UINT),
+ Self::R64G64B64A64_SINT => Some(NumericType::SINT),
+ Self::R64G64B64A64_SFLOAT => Some(NumericType::SFLOAT),
+ Self::B10G11R11_UFLOAT_PACK32 => Some(NumericType::UFLOAT),
+ Self::E5B9G9R9_UFLOAT_PACK32 => Some(NumericType::UFLOAT),
+ Self::BC1_RGB_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::BC1_RGB_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::BC1_RGBA_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::BC1_RGBA_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::BC2_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::BC2_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::BC3_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::BC3_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::BC4_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::BC4_SNORM_BLOCK => Some(NumericType::SRGB),
+ Self::BC5_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::BC5_SNORM_BLOCK => Some(NumericType::SRGB),
+ Self::BC6H_UFLOAT_BLOCK => Some(NumericType::UFLOAT),
+ Self::BC6H_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::BC7_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::BC7_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ETC2_R8G8B8_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ETC2_R8G8B8_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ETC2_R8G8B8A1_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ETC2_R8G8B8A1_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ETC2_R8G8B8A8_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ETC2_R8G8B8A8_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::EAC_R11_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::EAC_R11_SNORM_BLOCK => Some(NumericType::SNORM),
+ Self::EAC_R11G11_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::EAC_R11G11_SNORM_BLOCK => Some(NumericType::SNORM),
+ Self::ASTC_4x4_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_4x4_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_5x4_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_5x4_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_5x5_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_5x5_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_6x5_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_6x5_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_6x6_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_6x6_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_8x5_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_8x5_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_8x6_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_8x6_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_8x8_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_8x8_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_10x5_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_10x5_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_10x6_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_10x6_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_10x8_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_10x8_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_10x10_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_10x10_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_12x10_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_12x10_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_12x12_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::ASTC_12x12_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::G8B8G8R8_422_UNORM => Some(NumericType::UNORM),
+ Self::B8G8R8G8_422_UNORM => Some(NumericType::UNORM),
+ Self::G8_B8_R8_3PLANE_420_UNORM => Some(NumericType::UNORM),
+ Self::G8_B8R8_2PLANE_420_UNORM => Some(NumericType::UNORM),
+ Self::G8_B8_R8_3PLANE_422_UNORM => Some(NumericType::UNORM),
+ Self::G8_B8R8_2PLANE_422_UNORM => Some(NumericType::UNORM),
+ Self::G8_B8_R8_3PLANE_444_UNORM => Some(NumericType::UNORM),
+ Self::R10X6_UNORM_PACK16 => Some(NumericType::UNORM),
+ Self::R10X6G10X6_UNORM_2PACK16 => Some(NumericType::UNORM),
+ Self::R10X6G10X6B10X6A10X6_UNORM_4PACK16 => Some(NumericType::UNORM),
+ Self::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => Some(NumericType::UNORM),
+ Self::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => Some(NumericType::UNORM),
+ Self::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => Some(NumericType::UNORM),
+ Self::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => Some(NumericType::UNORM),
+ Self::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => Some(NumericType::UNORM),
+ Self::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => Some(NumericType::UNORM),
+ Self::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 => Some(NumericType::UNORM),
+ Self::R12X4_UNORM_PACK16 => Some(NumericType::UNORM),
+ Self::R12X4G12X4_UNORM_2PACK16 => Some(NumericType::UNORM),
+ Self::R12X4G12X4B12X4A12X4_UNORM_4PACK16 => Some(NumericType::UNORM),
+ Self::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => Some(NumericType::UNORM),
+ Self::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => Some(NumericType::UNORM),
+ Self::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => Some(NumericType::UNORM),
+ Self::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => Some(NumericType::UNORM),
+ Self::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => Some(NumericType::UNORM),
+ Self::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => Some(NumericType::UNORM),
+ Self::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 => Some(NumericType::UNORM),
+ Self::G16B16G16R16_422_UNORM => Some(NumericType::UNORM),
+ Self::B16G16R16G16_422_UNORM => Some(NumericType::UNORM),
+ Self::G16_B16_R16_3PLANE_420_UNORM => Some(NumericType::UNORM),
+ Self::G16_B16R16_2PLANE_420_UNORM => Some(NumericType::UNORM),
+ Self::G16_B16_R16_3PLANE_422_UNORM => Some(NumericType::UNORM),
+ Self::G16_B16R16_2PLANE_422_UNORM => Some(NumericType::UNORM),
+ Self::G16_B16_R16_3PLANE_444_UNORM => Some(NumericType::UNORM),
+ Self::PVRTC1_2BPP_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::PVRTC1_4BPP_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::PVRTC2_2BPP_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::PVRTC2_4BPP_UNORM_BLOCK => Some(NumericType::UNORM),
+ Self::PVRTC1_2BPP_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::PVRTC1_4BPP_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::PVRTC2_2BPP_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::PVRTC2_4BPP_SRGB_BLOCK => Some(NumericType::SRGB),
+ Self::ASTC_4x4_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_5x4_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_5x5_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_6x5_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_6x6_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_8x5_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_8x6_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_8x8_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_10x5_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_10x6_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_10x8_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_10x10_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_12x10_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::ASTC_12x12_SFLOAT_BLOCK => Some(NumericType::SFLOAT),
+ Self::G8_B8R8_2PLANE_444_UNORM => Some(NumericType::UNORM),
+ Self::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 => Some(NumericType::UNORM),
+ Self::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 => Some(NumericType::UNORM),
+ Self::G16_B16R16_2PLANE_444_UNORM => Some(NumericType::UNORM),
+ Self::A4R4G4B4_UNORM_PACK16 => Some(NumericType::UNORM),
+ Self::A4B4G4R4_UNORM_PACK16 => Some(NumericType::UNORM),
+ Self::R16G16_S10_5_NV => Some(NumericType::SINT),
+ _ => None,
+ }
+ }
+ #[doc = r" Returns the numeric data type of the depth aspect of this format. Returns `None`"]
+ #[doc = r" color and stencil-only formats."]
+ pub fn type_depth(self) -> Option<NumericType> {
+ match self {
+ Self::D16_UNORM => Some(NumericType::UNORM),
+ Self::X8_D24_UNORM_PACK32 => Some(NumericType::UNORM),
+ Self::D32_SFLOAT => Some(NumericType::SFLOAT),
+ Self::D16_UNORM_S8_UINT => Some(NumericType::UNORM),
+ Self::D24_UNORM_S8_UINT => Some(NumericType::UNORM),
+ Self::D32_SFLOAT_S8_UINT => Some(NumericType::SFLOAT),
+ _ => None,
+ }
+ }
+ #[doc = r" Returns the numeric data type of the stencil aspect of this format. Returns `None`"]
+ #[doc = r" for color and depth-only formats."]
+ pub fn type_stencil(self) -> Option<NumericType> {
+ match self {
+ Self::S8_UINT => Some(NumericType::UINT),
+ Self::D16_UNORM_S8_UINT => Some(NumericType::UINT),
+ Self::D24_UNORM_S8_UINT => Some(NumericType::UINT),
+ Self::D32_SFLOAT_S8_UINT => Some(NumericType::UINT),
+ _ => None,
+ }
+ }
+ #[doc = r" For YCbCr (YUV) formats, returns the way in which the chroma components are"]
+ #[doc = r" represented. Returns `None` for non-YCbCr formats."]
+ #[doc = r""]
+ #[doc = r" If an image view is created for one of the formats for which this function returns"]
+ #[doc = r" `Some`, with the `color` aspect selected, then the view and any samplers that sample"]
+ #[doc = r" it must be created with an attached sampler YCbCr conversion object."]
+ pub fn ycbcr_chroma_sampling(self) -> Option<ChromaSampling> {
+ match self {
+ Self::G8B8G8R8_422_UNORM => Some(ChromaSampling::Mode422),
+ Self::B8G8R8G8_422_UNORM => Some(ChromaSampling::Mode422),
+ Self::G8_B8_R8_3PLANE_420_UNORM => Some(ChromaSampling::Mode420),
+ Self::G8_B8R8_2PLANE_420_UNORM => Some(ChromaSampling::Mode420),
+ Self::G8_B8_R8_3PLANE_422_UNORM => Some(ChromaSampling::Mode422),
+ Self::G8_B8R8_2PLANE_422_UNORM => Some(ChromaSampling::Mode422),
+ Self::G8_B8_R8_3PLANE_444_UNORM => Some(ChromaSampling::Mode444),
+ Self::R10X6G10X6B10X6A10X6_UNORM_4PACK16 => Some(ChromaSampling::Mode444),
+ Self::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => Some(ChromaSampling::Mode422),
+ Self::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => Some(ChromaSampling::Mode422),
+ Self::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => Some(ChromaSampling::Mode420),
+ Self::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => Some(ChromaSampling::Mode420),
+ Self::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => Some(ChromaSampling::Mode422),
+ Self::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => Some(ChromaSampling::Mode422),
+ Self::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 => Some(ChromaSampling::Mode444),
+ Self::R12X4G12X4B12X4A12X4_UNORM_4PACK16 => Some(ChromaSampling::Mode444),
+ Self::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => Some(ChromaSampling::Mode422),
+ Self::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => Some(ChromaSampling::Mode422),
+ Self::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => Some(ChromaSampling::Mode420),
+ Self::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => Some(ChromaSampling::Mode420),
+ Self::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => Some(ChromaSampling::Mode422),
+ Self::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => Some(ChromaSampling::Mode422),
+ Self::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 => Some(ChromaSampling::Mode444),
+ Self::G16B16G16R16_422_UNORM => Some(ChromaSampling::Mode422),
+ Self::B16G16R16G16_422_UNORM => Some(ChromaSampling::Mode422),
+ Self::G16_B16_R16_3PLANE_420_UNORM => Some(ChromaSampling::Mode420),
+ Self::G16_B16R16_2PLANE_420_UNORM => Some(ChromaSampling::Mode420),
+ Self::G16_B16_R16_3PLANE_422_UNORM => Some(ChromaSampling::Mode422),
+ Self::G16_B16R16_2PLANE_422_UNORM => Some(ChromaSampling::Mode422),
+ Self::G16_B16_R16_3PLANE_444_UNORM => Some(ChromaSampling::Mode444),
+ Self::G8_B8R8_2PLANE_444_UNORM => Some(ChromaSampling::Mode444),
+ Self::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 => Some(ChromaSampling::Mode444),
+ Self::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 => Some(ChromaSampling::Mode444),
+ Self::G16_B16R16_2PLANE_444_UNORM => Some(ChromaSampling::Mode444),
+ _ => None,
+ }
+ }
+ #[allow(dead_code)]
+ pub(crate) fn validate_device(
+ self,
+ #[allow(unused_variables)] device: &crate::device::Device,
+ ) -> Result<(), crate::RequirementNotMet> {
+ match self {
+ Self::R4G4_UNORM_PACK8 => {}
+ Self::R4G4B4A4_UNORM_PACK16 => {}
+ Self::B4G4R4A4_UNORM_PACK16 => {}
+ Self::R5G6B5_UNORM_PACK16 => {}
+ Self::B5G6R5_UNORM_PACK16 => {}
+ Self::R5G5B5A1_UNORM_PACK16 => {}
+ Self::B5G5R5A1_UNORM_PACK16 => {}
+ Self::A1R5G5B5_UNORM_PACK16 => {}
+ Self::R8_UNORM => {}
+ Self::R8_SNORM => {}
+ Self::R8_USCALED => {}
+ Self::R8_SSCALED => {}
+ Self::R8_UINT => {}
+ Self::R8_SINT => {}
+ Self::R8_SRGB => {}
+ Self::R8G8_UNORM => {}
+ Self::R8G8_SNORM => {}
+ Self::R8G8_USCALED => {}
+ Self::R8G8_SSCALED => {}
+ Self::R8G8_UINT => {}
+ Self::R8G8_SINT => {}
+ Self::R8G8_SRGB => {}
+ Self::R8G8B8_UNORM => {}
+ Self::R8G8B8_SNORM => {}
+ Self::R8G8B8_USCALED => {}
+ Self::R8G8B8_SSCALED => {}
+ Self::R8G8B8_UINT => {}
+ Self::R8G8B8_SINT => {}
+ Self::R8G8B8_SRGB => {}
+ Self::B8G8R8_UNORM => {}
+ Self::B8G8R8_SNORM => {}
+ Self::B8G8R8_USCALED => {}
+ Self::B8G8R8_SSCALED => {}
+ Self::B8G8R8_UINT => {}
+ Self::B8G8R8_SINT => {}
+ Self::B8G8R8_SRGB => {}
+ Self::R8G8B8A8_UNORM => {}
+ Self::R8G8B8A8_SNORM => {}
+ Self::R8G8B8A8_USCALED => {}
+ Self::R8G8B8A8_SSCALED => {}
+ Self::R8G8B8A8_UINT => {}
+ Self::R8G8B8A8_SINT => {}
+ Self::R8G8B8A8_SRGB => {}
+ Self::B8G8R8A8_UNORM => {}
+ Self::B8G8R8A8_SNORM => {}
+ Self::B8G8R8A8_USCALED => {}
+ Self::B8G8R8A8_SSCALED => {}
+ Self::B8G8R8A8_UINT => {}
+ Self::B8G8R8A8_SINT => {}
+ Self::B8G8R8A8_SRGB => {}
+ Self::A8B8G8R8_UNORM_PACK32 => {}
+ Self::A8B8G8R8_SNORM_PACK32 => {}
+ Self::A8B8G8R8_USCALED_PACK32 => {}
+ Self::A8B8G8R8_SSCALED_PACK32 => {}
+ Self::A8B8G8R8_UINT_PACK32 => {}
+ Self::A8B8G8R8_SINT_PACK32 => {}
+ Self::A8B8G8R8_SRGB_PACK32 => {}
+ Self::A2R10G10B10_UNORM_PACK32 => {}
+ Self::A2R10G10B10_SNORM_PACK32 => {}
+ Self::A2R10G10B10_USCALED_PACK32 => {}
+ Self::A2R10G10B10_SSCALED_PACK32 => {}
+ Self::A2R10G10B10_UINT_PACK32 => {}
+ Self::A2R10G10B10_SINT_PACK32 => {}
+ Self::A2B10G10R10_UNORM_PACK32 => {}
+ Self::A2B10G10R10_SNORM_PACK32 => {}
+ Self::A2B10G10R10_USCALED_PACK32 => {}
+ Self::A2B10G10R10_SSCALED_PACK32 => {}
+ Self::A2B10G10R10_UINT_PACK32 => {}
+ Self::A2B10G10R10_SINT_PACK32 => {}
+ Self::R16_UNORM => {}
+ Self::R16_SNORM => {}
+ Self::R16_USCALED => {}
+ Self::R16_SSCALED => {}
+ Self::R16_UINT => {}
+ Self::R16_SINT => {}
+ Self::R16_SFLOAT => {}
+ Self::R16G16_UNORM => {}
+ Self::R16G16_SNORM => {}
+ Self::R16G16_USCALED => {}
+ Self::R16G16_SSCALED => {}
+ Self::R16G16_UINT => {}
+ Self::R16G16_SINT => {}
+ Self::R16G16_SFLOAT => {}
+ Self::R16G16B16_UNORM => {}
+ Self::R16G16B16_SNORM => {}
+ Self::R16G16B16_USCALED => {}
+ Self::R16G16B16_SSCALED => {}
+ Self::R16G16B16_UINT => {}
+ Self::R16G16B16_SINT => {}
+ Self::R16G16B16_SFLOAT => {}
+ Self::R16G16B16A16_UNORM => {}
+ Self::R16G16B16A16_SNORM => {}
+ Self::R16G16B16A16_USCALED => {}
+ Self::R16G16B16A16_SSCALED => {}
+ Self::R16G16B16A16_UINT => {}
+ Self::R16G16B16A16_SINT => {}
+ Self::R16G16B16A16_SFLOAT => {}
+ Self::R32_UINT => {}
+ Self::R32_SINT => {}
+ Self::R32_SFLOAT => {}
+ Self::R32G32_UINT => {}
+ Self::R32G32_SINT => {}
+ Self::R32G32_SFLOAT => {}
+ Self::R32G32B32_UINT => {}
+ Self::R32G32B32_SINT => {}
+ Self::R32G32B32_SFLOAT => {}
+ Self::R32G32B32A32_UINT => {}
+ Self::R32G32B32A32_SINT => {}
+ Self::R32G32B32A32_SFLOAT => {}
+ Self::R64_UINT => {}
+ Self::R64_SINT => {}
+ Self::R64_SFLOAT => {}
+ Self::R64G64_UINT => {}
+ Self::R64G64_SINT => {}
+ Self::R64G64_SFLOAT => {}
+ Self::R64G64B64_UINT => {}
+ Self::R64G64B64_SINT => {}
+ Self::R64G64B64_SFLOAT => {}
+ Self::R64G64B64A64_UINT => {}
+ Self::R64G64B64A64_SINT => {}
+ Self::R64G64B64A64_SFLOAT => {}
+ Self::B10G11R11_UFLOAT_PACK32 => {}
+ Self::E5B9G9R9_UFLOAT_PACK32 => {}
+ Self::D16_UNORM => {}
+ Self::X8_D24_UNORM_PACK32 => {}
+ Self::D32_SFLOAT => {}
+ Self::S8_UINT => {}
+ Self::D16_UNORM_S8_UINT => {}
+ Self::D24_UNORM_S8_UINT => {}
+ Self::D32_SFLOAT_S8_UINT => {}
+ Self::BC1_RGB_UNORM_BLOCK => {}
+ Self::BC1_RGB_SRGB_BLOCK => {}
+ Self::BC1_RGBA_UNORM_BLOCK => {}
+ Self::BC1_RGBA_SRGB_BLOCK => {}
+ Self::BC2_UNORM_BLOCK => {}
+ Self::BC2_SRGB_BLOCK => {}
+ Self::BC3_UNORM_BLOCK => {}
+ Self::BC3_SRGB_BLOCK => {}
+ Self::BC4_UNORM_BLOCK => {}
+ Self::BC4_SNORM_BLOCK => {}
+ Self::BC5_UNORM_BLOCK => {}
+ Self::BC5_SNORM_BLOCK => {}
+ Self::BC6H_UFLOAT_BLOCK => {}
+ Self::BC6H_SFLOAT_BLOCK => {}
+ Self::BC7_UNORM_BLOCK => {}
+ Self::BC7_SRGB_BLOCK => {}
+ Self::ETC2_R8G8B8_UNORM_BLOCK => {}
+ Self::ETC2_R8G8B8_SRGB_BLOCK => {}
+ Self::ETC2_R8G8B8A1_UNORM_BLOCK => {}
+ Self::ETC2_R8G8B8A1_SRGB_BLOCK => {}
+ Self::ETC2_R8G8B8A8_UNORM_BLOCK => {}
+ Self::ETC2_R8G8B8A8_SRGB_BLOCK => {}
+ Self::EAC_R11_UNORM_BLOCK => {}
+ Self::EAC_R11_SNORM_BLOCK => {}
+ Self::EAC_R11G11_UNORM_BLOCK => {}
+ Self::EAC_R11G11_SNORM_BLOCK => {}
+ Self::ASTC_4x4_UNORM_BLOCK => {}
+ Self::ASTC_4x4_SRGB_BLOCK => {}
+ Self::ASTC_5x4_UNORM_BLOCK => {}
+ Self::ASTC_5x4_SRGB_BLOCK => {}
+ Self::ASTC_5x5_UNORM_BLOCK => {}
+ Self::ASTC_5x5_SRGB_BLOCK => {}
+ Self::ASTC_6x5_UNORM_BLOCK => {}
+ Self::ASTC_6x5_SRGB_BLOCK => {}
+ Self::ASTC_6x6_UNORM_BLOCK => {}
+ Self::ASTC_6x6_SRGB_BLOCK => {}
+ Self::ASTC_8x5_UNORM_BLOCK => {}
+ Self::ASTC_8x5_SRGB_BLOCK => {}
+ Self::ASTC_8x6_UNORM_BLOCK => {}
+ Self::ASTC_8x6_SRGB_BLOCK => {}
+ Self::ASTC_8x8_UNORM_BLOCK => {}
+ Self::ASTC_8x8_SRGB_BLOCK => {}
+ Self::ASTC_10x5_UNORM_BLOCK => {}
+ Self::ASTC_10x5_SRGB_BLOCK => {}
+ Self::ASTC_10x6_UNORM_BLOCK => {}
+ Self::ASTC_10x6_SRGB_BLOCK => {}
+ Self::ASTC_10x8_UNORM_BLOCK => {}
+ Self::ASTC_10x8_SRGB_BLOCK => {}
+ Self::ASTC_10x10_UNORM_BLOCK => {}
+ Self::ASTC_10x10_SRGB_BLOCK => {}
+ Self::ASTC_12x10_UNORM_BLOCK => {}
+ Self::ASTC_12x10_SRGB_BLOCK => {}
+ Self::ASTC_12x12_UNORM_BLOCK => {}
+ Self::ASTC_12x12_SRGB_BLOCK => {}
+ Self::G8B8G8R8_422_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8B8G8R8_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::B8G8R8G8_422_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::B8G8R8G8_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G8_B8_R8_3PLANE_420_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8_B8_R8_3PLANE_420_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G8_B8R8_2PLANE_420_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8_B8R8_2PLANE_420_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G8_B8_R8_3PLANE_422_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8_B8_R8_3PLANE_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G8_B8R8_2PLANE_422_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8_B8R8_2PLANE_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G8_B8_R8_3PLANE_444_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8_B8_R8_3PLANE_444_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R10X6_UNORM_PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R10X6_UNORM_PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R10X6G10X6_UNORM_2PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R10X6G10X6_UNORM_2PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R10X6G10X6B10X6A10X6_UNORM_4PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R10X6G10X6B10X6A10X6_UNORM_4PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R12X4_UNORM_PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R12X4_UNORM_PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R12X4G12X4_UNORM_2PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R12X4G12X4_UNORM_2PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R12X4G12X4B12X4A12X4_UNORM_4PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R12X4G12X4B12X4A12X4_UNORM_4PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16B16G16R16_422_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16B16G16R16_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::B16G16R16G16_422_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::B16G16R16G16_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16_B16_R16_3PLANE_420_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16_B16_R16_3PLANE_420_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16_B16R16_2PLANE_420_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16_B16R16_2PLANE_420_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16_B16_R16_3PLANE_422_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16_B16_R16_3PLANE_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16_B16R16_2PLANE_422_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16_B16R16_2PLANE_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16_B16_R16_3PLANE_444_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_1
+ || device.enabled_extensions().khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16_B16_R16_3PLANE_444_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC1_2BPP_UNORM_BLOCK => {
+ if !(device.enabled_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC1_2BPP_UNORM_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC1_4BPP_UNORM_BLOCK => {
+ if !(device.enabled_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC1_4BPP_UNORM_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC2_2BPP_UNORM_BLOCK => {
+ if !(device.enabled_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC2_2BPP_UNORM_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC2_4BPP_UNORM_BLOCK => {
+ if !(device.enabled_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC2_4BPP_UNORM_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC1_2BPP_SRGB_BLOCK => {
+ if !(device.enabled_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC1_2BPP_SRGB_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC1_4BPP_SRGB_BLOCK => {
+ if !(device.enabled_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC1_4BPP_SRGB_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC2_2BPP_SRGB_BLOCK => {
+ if !(device.enabled_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC2_2BPP_SRGB_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC2_4BPP_SRGB_BLOCK => {
+ if !(device.enabled_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC2_4BPP_SRGB_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_4x4_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_4x4_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_5x4_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_5x4_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_5x5_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_5x5_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_6x5_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_6x5_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_6x6_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_6x6_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_8x5_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_8x5_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_8x6_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_8x6_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_8x8_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_8x8_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_10x5_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_10x5_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_10x6_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_10x6_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_10x8_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_10x8_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_10x10_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_10x10_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_12x10_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_12x10_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_12x12_SFLOAT_BLOCK => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_12x12_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G8_B8R8_2PLANE_444_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_ycbcr_2plane_444_formats)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8_B8R8_2PLANE_444_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_ycbcr_2plane_444_formats"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_ycbcr_2plane_444_formats)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_ycbcr_2plane_444_formats"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_ycbcr_2plane_444_formats)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_ycbcr_2plane_444_formats"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16_B16R16_2PLANE_444_UNORM => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_ycbcr_2plane_444_formats)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16_B16R16_2PLANE_444_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_ycbcr_2plane_444_formats"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::A4R4G4B4_UNORM_PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_4444_formats)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::A4R4G4B4_UNORM_PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_4444_formats"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::A4B4G4R4_UNORM_PACK16 => {
+ if !(device.api_version() >= crate::Version::V1_3
+ || device.enabled_extensions().ext_4444_formats)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::A4B4G4R4_UNORM_PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_4444_formats"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R16G16_S10_5_NV => {
+ if !(device.enabled_extensions().nv_optical_flow) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R16G16_S10_5_NV`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["nv_optical_flow"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ }
+ Ok(())
+ }
+ #[allow(dead_code)]
+ pub(crate) fn validate_physical_device(
+ self,
+ #[allow(unused_variables)] physical_device: &crate::device::physical::PhysicalDevice,
+ ) -> Result<(), crate::RequirementNotMet> {
+ match self {
+ Self::R4G4_UNORM_PACK8 => {}
+ Self::R4G4B4A4_UNORM_PACK16 => {}
+ Self::B4G4R4A4_UNORM_PACK16 => {}
+ Self::R5G6B5_UNORM_PACK16 => {}
+ Self::B5G6R5_UNORM_PACK16 => {}
+ Self::R5G5B5A1_UNORM_PACK16 => {}
+ Self::B5G5R5A1_UNORM_PACK16 => {}
+ Self::A1R5G5B5_UNORM_PACK16 => {}
+ Self::R8_UNORM => {}
+ Self::R8_SNORM => {}
+ Self::R8_USCALED => {}
+ Self::R8_SSCALED => {}
+ Self::R8_UINT => {}
+ Self::R8_SINT => {}
+ Self::R8_SRGB => {}
+ Self::R8G8_UNORM => {}
+ Self::R8G8_SNORM => {}
+ Self::R8G8_USCALED => {}
+ Self::R8G8_SSCALED => {}
+ Self::R8G8_UINT => {}
+ Self::R8G8_SINT => {}
+ Self::R8G8_SRGB => {}
+ Self::R8G8B8_UNORM => {}
+ Self::R8G8B8_SNORM => {}
+ Self::R8G8B8_USCALED => {}
+ Self::R8G8B8_SSCALED => {}
+ Self::R8G8B8_UINT => {}
+ Self::R8G8B8_SINT => {}
+ Self::R8G8B8_SRGB => {}
+ Self::B8G8R8_UNORM => {}
+ Self::B8G8R8_SNORM => {}
+ Self::B8G8R8_USCALED => {}
+ Self::B8G8R8_SSCALED => {}
+ Self::B8G8R8_UINT => {}
+ Self::B8G8R8_SINT => {}
+ Self::B8G8R8_SRGB => {}
+ Self::R8G8B8A8_UNORM => {}
+ Self::R8G8B8A8_SNORM => {}
+ Self::R8G8B8A8_USCALED => {}
+ Self::R8G8B8A8_SSCALED => {}
+ Self::R8G8B8A8_UINT => {}
+ Self::R8G8B8A8_SINT => {}
+ Self::R8G8B8A8_SRGB => {}
+ Self::B8G8R8A8_UNORM => {}
+ Self::B8G8R8A8_SNORM => {}
+ Self::B8G8R8A8_USCALED => {}
+ Self::B8G8R8A8_SSCALED => {}
+ Self::B8G8R8A8_UINT => {}
+ Self::B8G8R8A8_SINT => {}
+ Self::B8G8R8A8_SRGB => {}
+ Self::A8B8G8R8_UNORM_PACK32 => {}
+ Self::A8B8G8R8_SNORM_PACK32 => {}
+ Self::A8B8G8R8_USCALED_PACK32 => {}
+ Self::A8B8G8R8_SSCALED_PACK32 => {}
+ Self::A8B8G8R8_UINT_PACK32 => {}
+ Self::A8B8G8R8_SINT_PACK32 => {}
+ Self::A8B8G8R8_SRGB_PACK32 => {}
+ Self::A2R10G10B10_UNORM_PACK32 => {}
+ Self::A2R10G10B10_SNORM_PACK32 => {}
+ Self::A2R10G10B10_USCALED_PACK32 => {}
+ Self::A2R10G10B10_SSCALED_PACK32 => {}
+ Self::A2R10G10B10_UINT_PACK32 => {}
+ Self::A2R10G10B10_SINT_PACK32 => {}
+ Self::A2B10G10R10_UNORM_PACK32 => {}
+ Self::A2B10G10R10_SNORM_PACK32 => {}
+ Self::A2B10G10R10_USCALED_PACK32 => {}
+ Self::A2B10G10R10_SSCALED_PACK32 => {}
+ Self::A2B10G10R10_UINT_PACK32 => {}
+ Self::A2B10G10R10_SINT_PACK32 => {}
+ Self::R16_UNORM => {}
+ Self::R16_SNORM => {}
+ Self::R16_USCALED => {}
+ Self::R16_SSCALED => {}
+ Self::R16_UINT => {}
+ Self::R16_SINT => {}
+ Self::R16_SFLOAT => {}
+ Self::R16G16_UNORM => {}
+ Self::R16G16_SNORM => {}
+ Self::R16G16_USCALED => {}
+ Self::R16G16_SSCALED => {}
+ Self::R16G16_UINT => {}
+ Self::R16G16_SINT => {}
+ Self::R16G16_SFLOAT => {}
+ Self::R16G16B16_UNORM => {}
+ Self::R16G16B16_SNORM => {}
+ Self::R16G16B16_USCALED => {}
+ Self::R16G16B16_SSCALED => {}
+ Self::R16G16B16_UINT => {}
+ Self::R16G16B16_SINT => {}
+ Self::R16G16B16_SFLOAT => {}
+ Self::R16G16B16A16_UNORM => {}
+ Self::R16G16B16A16_SNORM => {}
+ Self::R16G16B16A16_USCALED => {}
+ Self::R16G16B16A16_SSCALED => {}
+ Self::R16G16B16A16_UINT => {}
+ Self::R16G16B16A16_SINT => {}
+ Self::R16G16B16A16_SFLOAT => {}
+ Self::R32_UINT => {}
+ Self::R32_SINT => {}
+ Self::R32_SFLOAT => {}
+ Self::R32G32_UINT => {}
+ Self::R32G32_SINT => {}
+ Self::R32G32_SFLOAT => {}
+ Self::R32G32B32_UINT => {}
+ Self::R32G32B32_SINT => {}
+ Self::R32G32B32_SFLOAT => {}
+ Self::R32G32B32A32_UINT => {}
+ Self::R32G32B32A32_SINT => {}
+ Self::R32G32B32A32_SFLOAT => {}
+ Self::R64_UINT => {}
+ Self::R64_SINT => {}
+ Self::R64_SFLOAT => {}
+ Self::R64G64_UINT => {}
+ Self::R64G64_SINT => {}
+ Self::R64G64_SFLOAT => {}
+ Self::R64G64B64_UINT => {}
+ Self::R64G64B64_SINT => {}
+ Self::R64G64B64_SFLOAT => {}
+ Self::R64G64B64A64_UINT => {}
+ Self::R64G64B64A64_SINT => {}
+ Self::R64G64B64A64_SFLOAT => {}
+ Self::B10G11R11_UFLOAT_PACK32 => {}
+ Self::E5B9G9R9_UFLOAT_PACK32 => {}
+ Self::D16_UNORM => {}
+ Self::X8_D24_UNORM_PACK32 => {}
+ Self::D32_SFLOAT => {}
+ Self::S8_UINT => {}
+ Self::D16_UNORM_S8_UINT => {}
+ Self::D24_UNORM_S8_UINT => {}
+ Self::D32_SFLOAT_S8_UINT => {}
+ Self::BC1_RGB_UNORM_BLOCK => {}
+ Self::BC1_RGB_SRGB_BLOCK => {}
+ Self::BC1_RGBA_UNORM_BLOCK => {}
+ Self::BC1_RGBA_SRGB_BLOCK => {}
+ Self::BC2_UNORM_BLOCK => {}
+ Self::BC2_SRGB_BLOCK => {}
+ Self::BC3_UNORM_BLOCK => {}
+ Self::BC3_SRGB_BLOCK => {}
+ Self::BC4_UNORM_BLOCK => {}
+ Self::BC4_SNORM_BLOCK => {}
+ Self::BC5_UNORM_BLOCK => {}
+ Self::BC5_SNORM_BLOCK => {}
+ Self::BC6H_UFLOAT_BLOCK => {}
+ Self::BC6H_SFLOAT_BLOCK => {}
+ Self::BC7_UNORM_BLOCK => {}
+ Self::BC7_SRGB_BLOCK => {}
+ Self::ETC2_R8G8B8_UNORM_BLOCK => {}
+ Self::ETC2_R8G8B8_SRGB_BLOCK => {}
+ Self::ETC2_R8G8B8A1_UNORM_BLOCK => {}
+ Self::ETC2_R8G8B8A1_SRGB_BLOCK => {}
+ Self::ETC2_R8G8B8A8_UNORM_BLOCK => {}
+ Self::ETC2_R8G8B8A8_SRGB_BLOCK => {}
+ Self::EAC_R11_UNORM_BLOCK => {}
+ Self::EAC_R11_SNORM_BLOCK => {}
+ Self::EAC_R11G11_UNORM_BLOCK => {}
+ Self::EAC_R11G11_SNORM_BLOCK => {}
+ Self::ASTC_4x4_UNORM_BLOCK => {}
+ Self::ASTC_4x4_SRGB_BLOCK => {}
+ Self::ASTC_5x4_UNORM_BLOCK => {}
+ Self::ASTC_5x4_SRGB_BLOCK => {}
+ Self::ASTC_5x5_UNORM_BLOCK => {}
+ Self::ASTC_5x5_SRGB_BLOCK => {}
+ Self::ASTC_6x5_UNORM_BLOCK => {}
+ Self::ASTC_6x5_SRGB_BLOCK => {}
+ Self::ASTC_6x6_UNORM_BLOCK => {}
+ Self::ASTC_6x6_SRGB_BLOCK => {}
+ Self::ASTC_8x5_UNORM_BLOCK => {}
+ Self::ASTC_8x5_SRGB_BLOCK => {}
+ Self::ASTC_8x6_UNORM_BLOCK => {}
+ Self::ASTC_8x6_SRGB_BLOCK => {}
+ Self::ASTC_8x8_UNORM_BLOCK => {}
+ Self::ASTC_8x8_SRGB_BLOCK => {}
+ Self::ASTC_10x5_UNORM_BLOCK => {}
+ Self::ASTC_10x5_SRGB_BLOCK => {}
+ Self::ASTC_10x6_UNORM_BLOCK => {}
+ Self::ASTC_10x6_SRGB_BLOCK => {}
+ Self::ASTC_10x8_UNORM_BLOCK => {}
+ Self::ASTC_10x8_SRGB_BLOCK => {}
+ Self::ASTC_10x10_UNORM_BLOCK => {}
+ Self::ASTC_10x10_SRGB_BLOCK => {}
+ Self::ASTC_12x10_UNORM_BLOCK => {}
+ Self::ASTC_12x10_SRGB_BLOCK => {}
+ Self::ASTC_12x12_UNORM_BLOCK => {}
+ Self::ASTC_12x12_SRGB_BLOCK => {}
+ Self::G8B8G8R8_422_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8B8G8R8_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::B8G8R8G8_422_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::B8G8R8G8_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G8_B8_R8_3PLANE_420_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8_B8_R8_3PLANE_420_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G8_B8R8_2PLANE_420_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8_B8R8_2PLANE_420_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G8_B8_R8_3PLANE_422_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8_B8_R8_3PLANE_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G8_B8R8_2PLANE_422_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8_B8R8_2PLANE_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G8_B8_R8_3PLANE_444_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8_B8_R8_3PLANE_444_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R10X6_UNORM_PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R10X6_UNORM_PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R10X6G10X6_UNORM_2PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R10X6G10X6_UNORM_2PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R10X6G10X6B10X6A10X6_UNORM_4PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R10X6G10X6B10X6A10X6_UNORM_4PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R12X4_UNORM_PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R12X4_UNORM_PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R12X4G12X4_UNORM_2PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R12X4G12X4_UNORM_2PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R12X4G12X4B12X4A12X4_UNORM_4PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R12X4G12X4B12X4A12X4_UNORM_4PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16B16G16R16_422_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16B16G16R16_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::B16G16R16G16_422_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::B16G16R16G16_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16_B16_R16_3PLANE_420_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16_B16_R16_3PLANE_420_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16_B16R16_2PLANE_420_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16_B16R16_2PLANE_420_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16_B16_R16_3PLANE_422_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16_B16_R16_3PLANE_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16_B16R16_2PLANE_422_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16_B16R16_2PLANE_422_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16_B16_R16_3PLANE_444_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_1
+ || physical_device
+ .supported_extensions()
+ .khr_sampler_ycbcr_conversion)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16_B16_R16_3PLANE_444_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_1),
+ device_extensions: &["khr_sampler_ycbcr_conversion"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC1_2BPP_UNORM_BLOCK => {
+ if !(physical_device.supported_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC1_2BPP_UNORM_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC1_4BPP_UNORM_BLOCK => {
+ if !(physical_device.supported_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC1_4BPP_UNORM_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC2_2BPP_UNORM_BLOCK => {
+ if !(physical_device.supported_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC2_2BPP_UNORM_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC2_4BPP_UNORM_BLOCK => {
+ if !(physical_device.supported_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC2_4BPP_UNORM_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC1_2BPP_SRGB_BLOCK => {
+ if !(physical_device.supported_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC1_2BPP_SRGB_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC1_4BPP_SRGB_BLOCK => {
+ if !(physical_device.supported_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC1_4BPP_SRGB_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC2_2BPP_SRGB_BLOCK => {
+ if !(physical_device.supported_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC2_2BPP_SRGB_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::PVRTC2_4BPP_SRGB_BLOCK => {
+ if !(physical_device.supported_extensions().img_format_pvrtc) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::PVRTC2_4BPP_SRGB_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["img_format_pvrtc"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_4x4_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_4x4_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_5x4_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_5x4_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_5x5_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_5x5_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_6x5_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_6x5_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_6x6_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_6x6_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_8x5_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_8x5_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_8x6_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_8x6_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_8x8_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_8x8_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_10x5_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_10x5_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_10x6_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_10x6_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_10x8_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_10x8_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_10x10_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_10x10_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_12x10_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_12x10_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::ASTC_12x12_SFLOAT_BLOCK => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_texture_compression_astc_hdr)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::ASTC_12x12_SFLOAT_BLOCK`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_texture_compression_astc_hdr"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G8_B8R8_2PLANE_444_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_ycbcr_2plane_444_formats)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G8_B8R8_2PLANE_444_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_ycbcr_2plane_444_formats"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_ycbcr_2plane_444_formats)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_ycbcr_2plane_444_formats"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_ycbcr_2plane_444_formats)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_ycbcr_2plane_444_formats"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::G16_B16R16_2PLANE_444_UNORM => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device
+ .supported_extensions()
+ .ext_ycbcr_2plane_444_formats)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::G16_B16R16_2PLANE_444_UNORM`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_ycbcr_2plane_444_formats"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::A4R4G4B4_UNORM_PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device.supported_extensions().ext_4444_formats)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::A4R4G4B4_UNORM_PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_4444_formats"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::A4B4G4R4_UNORM_PACK16 => {
+ if !(physical_device.api_version() >= crate::Version::V1_3
+ || physical_device.supported_extensions().ext_4444_formats)
+ {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::A4B4G4R4_UNORM_PACK16`",
+ requires_one_of: crate::RequiresOneOf {
+ api_version: Some(crate::Version::V1_3),
+ device_extensions: &["ext_4444_formats"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ Self::R16G16_S10_5_NV => {
+ if !(physical_device.supported_extensions().nv_optical_flow) {
+ return Err(crate::RequirementNotMet {
+ required_for: "`Format::R16G16_S10_5_NV`",
+ requires_one_of: crate::RequiresOneOf {
+ device_extensions: &["nv_optical_flow"],
+ ..Default::default()
+ },
+ });
+ }
+ }
+ }
+ Ok(())
+ }
+}
+impl TryFrom<ash::vk::Format> for Format {
+ type Error = ();
+ fn try_from(val: ash::vk::Format) -> Result<Format, ()> {
+ match val {
+ ash::vk::Format::R4G4_UNORM_PACK8 => Ok(Self::R4G4_UNORM_PACK8),
+ ash::vk::Format::R4G4B4A4_UNORM_PACK16 => Ok(Self::R4G4B4A4_UNORM_PACK16),
+ ash::vk::Format::B4G4R4A4_UNORM_PACK16 => Ok(Self::B4G4R4A4_UNORM_PACK16),
+ ash::vk::Format::R5G6B5_UNORM_PACK16 => Ok(Self::R5G6B5_UNORM_PACK16),
+ ash::vk::Format::B5G6R5_UNORM_PACK16 => Ok(Self::B5G6R5_UNORM_PACK16),
+ ash::vk::Format::R5G5B5A1_UNORM_PACK16 => Ok(Self::R5G5B5A1_UNORM_PACK16),
+ ash::vk::Format::B5G5R5A1_UNORM_PACK16 => Ok(Self::B5G5R5A1_UNORM_PACK16),
+ ash::vk::Format::A1R5G5B5_UNORM_PACK16 => Ok(Self::A1R5G5B5_UNORM_PACK16),
+ ash::vk::Format::R8_UNORM => Ok(Self::R8_UNORM),
+ ash::vk::Format::R8_SNORM => Ok(Self::R8_SNORM),
+ ash::vk::Format::R8_USCALED => Ok(Self::R8_USCALED),
+ ash::vk::Format::R8_SSCALED => Ok(Self::R8_SSCALED),
+ ash::vk::Format::R8_UINT => Ok(Self::R8_UINT),
+ ash::vk::Format::R8_SINT => Ok(Self::R8_SINT),
+ ash::vk::Format::R8_SRGB => Ok(Self::R8_SRGB),
+ ash::vk::Format::R8G8_UNORM => Ok(Self::R8G8_UNORM),
+ ash::vk::Format::R8G8_SNORM => Ok(Self::R8G8_SNORM),
+ ash::vk::Format::R8G8_USCALED => Ok(Self::R8G8_USCALED),
+ ash::vk::Format::R8G8_SSCALED => Ok(Self::R8G8_SSCALED),
+ ash::vk::Format::R8G8_UINT => Ok(Self::R8G8_UINT),
+ ash::vk::Format::R8G8_SINT => Ok(Self::R8G8_SINT),
+ ash::vk::Format::R8G8_SRGB => Ok(Self::R8G8_SRGB),
+ ash::vk::Format::R8G8B8_UNORM => Ok(Self::R8G8B8_UNORM),
+ ash::vk::Format::R8G8B8_SNORM => Ok(Self::R8G8B8_SNORM),
+ ash::vk::Format::R8G8B8_USCALED => Ok(Self::R8G8B8_USCALED),
+ ash::vk::Format::R8G8B8_SSCALED => Ok(Self::R8G8B8_SSCALED),
+ ash::vk::Format::R8G8B8_UINT => Ok(Self::R8G8B8_UINT),
+ ash::vk::Format::R8G8B8_SINT => Ok(Self::R8G8B8_SINT),
+ ash::vk::Format::R8G8B8_SRGB => Ok(Self::R8G8B8_SRGB),
+ ash::vk::Format::B8G8R8_UNORM => Ok(Self::B8G8R8_UNORM),
+ ash::vk::Format::B8G8R8_SNORM => Ok(Self::B8G8R8_SNORM),
+ ash::vk::Format::B8G8R8_USCALED => Ok(Self::B8G8R8_USCALED),
+ ash::vk::Format::B8G8R8_SSCALED => Ok(Self::B8G8R8_SSCALED),
+ ash::vk::Format::B8G8R8_UINT => Ok(Self::B8G8R8_UINT),
+ ash::vk::Format::B8G8R8_SINT => Ok(Self::B8G8R8_SINT),
+ ash::vk::Format::B8G8R8_SRGB => Ok(Self::B8G8R8_SRGB),
+ ash::vk::Format::R8G8B8A8_UNORM => Ok(Self::R8G8B8A8_UNORM),
+ ash::vk::Format::R8G8B8A8_SNORM => Ok(Self::R8G8B8A8_SNORM),
+ ash::vk::Format::R8G8B8A8_USCALED => Ok(Self::R8G8B8A8_USCALED),
+ ash::vk::Format::R8G8B8A8_SSCALED => Ok(Self::R8G8B8A8_SSCALED),
+ ash::vk::Format::R8G8B8A8_UINT => Ok(Self::R8G8B8A8_UINT),
+ ash::vk::Format::R8G8B8A8_SINT => Ok(Self::R8G8B8A8_SINT),
+ ash::vk::Format::R8G8B8A8_SRGB => Ok(Self::R8G8B8A8_SRGB),
+ ash::vk::Format::B8G8R8A8_UNORM => Ok(Self::B8G8R8A8_UNORM),
+ ash::vk::Format::B8G8R8A8_SNORM => Ok(Self::B8G8R8A8_SNORM),
+ ash::vk::Format::B8G8R8A8_USCALED => Ok(Self::B8G8R8A8_USCALED),
+ ash::vk::Format::B8G8R8A8_SSCALED => Ok(Self::B8G8R8A8_SSCALED),
+ ash::vk::Format::B8G8R8A8_UINT => Ok(Self::B8G8R8A8_UINT),
+ ash::vk::Format::B8G8R8A8_SINT => Ok(Self::B8G8R8A8_SINT),
+ ash::vk::Format::B8G8R8A8_SRGB => Ok(Self::B8G8R8A8_SRGB),
+ ash::vk::Format::A8B8G8R8_UNORM_PACK32 => Ok(Self::A8B8G8R8_UNORM_PACK32),
+ ash::vk::Format::A8B8G8R8_SNORM_PACK32 => Ok(Self::A8B8G8R8_SNORM_PACK32),
+ ash::vk::Format::A8B8G8R8_USCALED_PACK32 => Ok(Self::A8B8G8R8_USCALED_PACK32),
+ ash::vk::Format::A8B8G8R8_SSCALED_PACK32 => Ok(Self::A8B8G8R8_SSCALED_PACK32),
+ ash::vk::Format::A8B8G8R8_UINT_PACK32 => Ok(Self::A8B8G8R8_UINT_PACK32),
+ ash::vk::Format::A8B8G8R8_SINT_PACK32 => Ok(Self::A8B8G8R8_SINT_PACK32),
+ ash::vk::Format::A8B8G8R8_SRGB_PACK32 => Ok(Self::A8B8G8R8_SRGB_PACK32),
+ ash::vk::Format::A2R10G10B10_UNORM_PACK32 => Ok(Self::A2R10G10B10_UNORM_PACK32),
+ ash::vk::Format::A2R10G10B10_SNORM_PACK32 => Ok(Self::A2R10G10B10_SNORM_PACK32),
+ ash::vk::Format::A2R10G10B10_USCALED_PACK32 => Ok(Self::A2R10G10B10_USCALED_PACK32),
+ ash::vk::Format::A2R10G10B10_SSCALED_PACK32 => Ok(Self::A2R10G10B10_SSCALED_PACK32),
+ ash::vk::Format::A2R10G10B10_UINT_PACK32 => Ok(Self::A2R10G10B10_UINT_PACK32),
+ ash::vk::Format::A2R10G10B10_SINT_PACK32 => Ok(Self::A2R10G10B10_SINT_PACK32),
+ ash::vk::Format::A2B10G10R10_UNORM_PACK32 => Ok(Self::A2B10G10R10_UNORM_PACK32),
+ ash::vk::Format::A2B10G10R10_SNORM_PACK32 => Ok(Self::A2B10G10R10_SNORM_PACK32),
+ ash::vk::Format::A2B10G10R10_USCALED_PACK32 => Ok(Self::A2B10G10R10_USCALED_PACK32),
+ ash::vk::Format::A2B10G10R10_SSCALED_PACK32 => Ok(Self::A2B10G10R10_SSCALED_PACK32),
+ ash::vk::Format::A2B10G10R10_UINT_PACK32 => Ok(Self::A2B10G10R10_UINT_PACK32),
+ ash::vk::Format::A2B10G10R10_SINT_PACK32 => Ok(Self::A2B10G10R10_SINT_PACK32),
+ ash::vk::Format::R16_UNORM => Ok(Self::R16_UNORM),
+ ash::vk::Format::R16_SNORM => Ok(Self::R16_SNORM),
+ ash::vk::Format::R16_USCALED => Ok(Self::R16_USCALED),
+ ash::vk::Format::R16_SSCALED => Ok(Self::R16_SSCALED),
+ ash::vk::Format::R16_UINT => Ok(Self::R16_UINT),
+ ash::vk::Format::R16_SINT => Ok(Self::R16_SINT),
+ ash::vk::Format::R16_SFLOAT => Ok(Self::R16_SFLOAT),
+ ash::vk::Format::R16G16_UNORM => Ok(Self::R16G16_UNORM),
+ ash::vk::Format::R16G16_SNORM => Ok(Self::R16G16_SNORM),
+ ash::vk::Format::R16G16_USCALED => Ok(Self::R16G16_USCALED),
+ ash::vk::Format::R16G16_SSCALED => Ok(Self::R16G16_SSCALED),
+ ash::vk::Format::R16G16_UINT => Ok(Self::R16G16_UINT),
+ ash::vk::Format::R16G16_SINT => Ok(Self::R16G16_SINT),
+ ash::vk::Format::R16G16_SFLOAT => Ok(Self::R16G16_SFLOAT),
+ ash::vk::Format::R16G16B16_UNORM => Ok(Self::R16G16B16_UNORM),
+ ash::vk::Format::R16G16B16_SNORM => Ok(Self::R16G16B16_SNORM),
+ ash::vk::Format::R16G16B16_USCALED => Ok(Self::R16G16B16_USCALED),
+ ash::vk::Format::R16G16B16_SSCALED => Ok(Self::R16G16B16_SSCALED),
+ ash::vk::Format::R16G16B16_UINT => Ok(Self::R16G16B16_UINT),
+ ash::vk::Format::R16G16B16_SINT => Ok(Self::R16G16B16_SINT),
+ ash::vk::Format::R16G16B16_SFLOAT => Ok(Self::R16G16B16_SFLOAT),
+ ash::vk::Format::R16G16B16A16_UNORM => Ok(Self::R16G16B16A16_UNORM),
+ ash::vk::Format::R16G16B16A16_SNORM => Ok(Self::R16G16B16A16_SNORM),
+ ash::vk::Format::R16G16B16A16_USCALED => Ok(Self::R16G16B16A16_USCALED),
+ ash::vk::Format::R16G16B16A16_SSCALED => Ok(Self::R16G16B16A16_SSCALED),
+ ash::vk::Format::R16G16B16A16_UINT => Ok(Self::R16G16B16A16_UINT),
+ ash::vk::Format::R16G16B16A16_SINT => Ok(Self::R16G16B16A16_SINT),
+ ash::vk::Format::R16G16B16A16_SFLOAT => Ok(Self::R16G16B16A16_SFLOAT),
+ ash::vk::Format::R32_UINT => Ok(Self::R32_UINT),
+ ash::vk::Format::R32_SINT => Ok(Self::R32_SINT),
+ ash::vk::Format::R32_SFLOAT => Ok(Self::R32_SFLOAT),
+ ash::vk::Format::R32G32_UINT => Ok(Self::R32G32_UINT),
+ ash::vk::Format::R32G32_SINT => Ok(Self::R32G32_SINT),
+ ash::vk::Format::R32G32_SFLOAT => Ok(Self::R32G32_SFLOAT),
+ ash::vk::Format::R32G32B32_UINT => Ok(Self::R32G32B32_UINT),
+ ash::vk::Format::R32G32B32_SINT => Ok(Self::R32G32B32_SINT),
+ ash::vk::Format::R32G32B32_SFLOAT => Ok(Self::R32G32B32_SFLOAT),
+ ash::vk::Format::R32G32B32A32_UINT => Ok(Self::R32G32B32A32_UINT),
+ ash::vk::Format::R32G32B32A32_SINT => Ok(Self::R32G32B32A32_SINT),
+ ash::vk::Format::R32G32B32A32_SFLOAT => Ok(Self::R32G32B32A32_SFLOAT),
+ ash::vk::Format::R64_UINT => Ok(Self::R64_UINT),
+ ash::vk::Format::R64_SINT => Ok(Self::R64_SINT),
+ ash::vk::Format::R64_SFLOAT => Ok(Self::R64_SFLOAT),
+ ash::vk::Format::R64G64_UINT => Ok(Self::R64G64_UINT),
+ ash::vk::Format::R64G64_SINT => Ok(Self::R64G64_SINT),
+ ash::vk::Format::R64G64_SFLOAT => Ok(Self::R64G64_SFLOAT),
+ ash::vk::Format::R64G64B64_UINT => Ok(Self::R64G64B64_UINT),
+ ash::vk::Format::R64G64B64_SINT => Ok(Self::R64G64B64_SINT),
+ ash::vk::Format::R64G64B64_SFLOAT => Ok(Self::R64G64B64_SFLOAT),
+ ash::vk::Format::R64G64B64A64_UINT => Ok(Self::R64G64B64A64_UINT),
+ ash::vk::Format::R64G64B64A64_SINT => Ok(Self::R64G64B64A64_SINT),
+ ash::vk::Format::R64G64B64A64_SFLOAT => Ok(Self::R64G64B64A64_SFLOAT),
+ ash::vk::Format::B10G11R11_UFLOAT_PACK32 => Ok(Self::B10G11R11_UFLOAT_PACK32),
+ ash::vk::Format::E5B9G9R9_UFLOAT_PACK32 => Ok(Self::E5B9G9R9_UFLOAT_PACK32),
+ ash::vk::Format::D16_UNORM => Ok(Self::D16_UNORM),
+ ash::vk::Format::X8_D24_UNORM_PACK32 => Ok(Self::X8_D24_UNORM_PACK32),
+ ash::vk::Format::D32_SFLOAT => Ok(Self::D32_SFLOAT),
+ ash::vk::Format::S8_UINT => Ok(Self::S8_UINT),
+ ash::vk::Format::D16_UNORM_S8_UINT => Ok(Self::D16_UNORM_S8_UINT),
+ ash::vk::Format::D24_UNORM_S8_UINT => Ok(Self::D24_UNORM_S8_UINT),
+ ash::vk::Format::D32_SFLOAT_S8_UINT => Ok(Self::D32_SFLOAT_S8_UINT),
+ ash::vk::Format::BC1_RGB_UNORM_BLOCK => Ok(Self::BC1_RGB_UNORM_BLOCK),
+ ash::vk::Format::BC1_RGB_SRGB_BLOCK => Ok(Self::BC1_RGB_SRGB_BLOCK),
+ ash::vk::Format::BC1_RGBA_UNORM_BLOCK => Ok(Self::BC1_RGBA_UNORM_BLOCK),
+ ash::vk::Format::BC1_RGBA_SRGB_BLOCK => Ok(Self::BC1_RGBA_SRGB_BLOCK),
+ ash::vk::Format::BC2_UNORM_BLOCK => Ok(Self::BC2_UNORM_BLOCK),
+ ash::vk::Format::BC2_SRGB_BLOCK => Ok(Self::BC2_SRGB_BLOCK),
+ ash::vk::Format::BC3_UNORM_BLOCK => Ok(Self::BC3_UNORM_BLOCK),
+ ash::vk::Format::BC3_SRGB_BLOCK => Ok(Self::BC3_SRGB_BLOCK),
+ ash::vk::Format::BC4_UNORM_BLOCK => Ok(Self::BC4_UNORM_BLOCK),
+ ash::vk::Format::BC4_SNORM_BLOCK => Ok(Self::BC4_SNORM_BLOCK),
+ ash::vk::Format::BC5_UNORM_BLOCK => Ok(Self::BC5_UNORM_BLOCK),
+ ash::vk::Format::BC5_SNORM_BLOCK => Ok(Self::BC5_SNORM_BLOCK),
+ ash::vk::Format::BC6H_UFLOAT_BLOCK => Ok(Self::BC6H_UFLOAT_BLOCK),
+ ash::vk::Format::BC6H_SFLOAT_BLOCK => Ok(Self::BC6H_SFLOAT_BLOCK),
+ ash::vk::Format::BC7_UNORM_BLOCK => Ok(Self::BC7_UNORM_BLOCK),
+ ash::vk::Format::BC7_SRGB_BLOCK => Ok(Self::BC7_SRGB_BLOCK),
+ ash::vk::Format::ETC2_R8G8B8_UNORM_BLOCK => Ok(Self::ETC2_R8G8B8_UNORM_BLOCK),
+ ash::vk::Format::ETC2_R8G8B8_SRGB_BLOCK => Ok(Self::ETC2_R8G8B8_SRGB_BLOCK),
+ ash::vk::Format::ETC2_R8G8B8A1_UNORM_BLOCK => Ok(Self::ETC2_R8G8B8A1_UNORM_BLOCK),
+ ash::vk::Format::ETC2_R8G8B8A1_SRGB_BLOCK => Ok(Self::ETC2_R8G8B8A1_SRGB_BLOCK),
+ ash::vk::Format::ETC2_R8G8B8A8_UNORM_BLOCK => Ok(Self::ETC2_R8G8B8A8_UNORM_BLOCK),
+ ash::vk::Format::ETC2_R8G8B8A8_SRGB_BLOCK => Ok(Self::ETC2_R8G8B8A8_SRGB_BLOCK),
+ ash::vk::Format::EAC_R11_UNORM_BLOCK => Ok(Self::EAC_R11_UNORM_BLOCK),
+ ash::vk::Format::EAC_R11_SNORM_BLOCK => Ok(Self::EAC_R11_SNORM_BLOCK),
+ ash::vk::Format::EAC_R11G11_UNORM_BLOCK => Ok(Self::EAC_R11G11_UNORM_BLOCK),
+ ash::vk::Format::EAC_R11G11_SNORM_BLOCK => Ok(Self::EAC_R11G11_SNORM_BLOCK),
+ ash::vk::Format::ASTC_4X4_UNORM_BLOCK => Ok(Self::ASTC_4x4_UNORM_BLOCK),
+ ash::vk::Format::ASTC_4X4_SRGB_BLOCK => Ok(Self::ASTC_4x4_SRGB_BLOCK),
+ ash::vk::Format::ASTC_5X4_UNORM_BLOCK => Ok(Self::ASTC_5x4_UNORM_BLOCK),
+ ash::vk::Format::ASTC_5X4_SRGB_BLOCK => Ok(Self::ASTC_5x4_SRGB_BLOCK),
+ ash::vk::Format::ASTC_5X5_UNORM_BLOCK => Ok(Self::ASTC_5x5_UNORM_BLOCK),
+ ash::vk::Format::ASTC_5X5_SRGB_BLOCK => Ok(Self::ASTC_5x5_SRGB_BLOCK),
+ ash::vk::Format::ASTC_6X5_UNORM_BLOCK => Ok(Self::ASTC_6x5_UNORM_BLOCK),
+ ash::vk::Format::ASTC_6X5_SRGB_BLOCK => Ok(Self::ASTC_6x5_SRGB_BLOCK),
+ ash::vk::Format::ASTC_6X6_UNORM_BLOCK => Ok(Self::ASTC_6x6_UNORM_BLOCK),
+ ash::vk::Format::ASTC_6X6_SRGB_BLOCK => Ok(Self::ASTC_6x6_SRGB_BLOCK),
+ ash::vk::Format::ASTC_8X5_UNORM_BLOCK => Ok(Self::ASTC_8x5_UNORM_BLOCK),
+ ash::vk::Format::ASTC_8X5_SRGB_BLOCK => Ok(Self::ASTC_8x5_SRGB_BLOCK),
+ ash::vk::Format::ASTC_8X6_UNORM_BLOCK => Ok(Self::ASTC_8x6_UNORM_BLOCK),
+ ash::vk::Format::ASTC_8X6_SRGB_BLOCK => Ok(Self::ASTC_8x6_SRGB_BLOCK),
+ ash::vk::Format::ASTC_8X8_UNORM_BLOCK => Ok(Self::ASTC_8x8_UNORM_BLOCK),
+ ash::vk::Format::ASTC_8X8_SRGB_BLOCK => Ok(Self::ASTC_8x8_SRGB_BLOCK),
+ ash::vk::Format::ASTC_10X5_UNORM_BLOCK => Ok(Self::ASTC_10x5_UNORM_BLOCK),
+ ash::vk::Format::ASTC_10X5_SRGB_BLOCK => Ok(Self::ASTC_10x5_SRGB_BLOCK),
+ ash::vk::Format::ASTC_10X6_UNORM_BLOCK => Ok(Self::ASTC_10x6_UNORM_BLOCK),
+ ash::vk::Format::ASTC_10X6_SRGB_BLOCK => Ok(Self::ASTC_10x6_SRGB_BLOCK),
+ ash::vk::Format::ASTC_10X8_UNORM_BLOCK => Ok(Self::ASTC_10x8_UNORM_BLOCK),
+ ash::vk::Format::ASTC_10X8_SRGB_BLOCK => Ok(Self::ASTC_10x8_SRGB_BLOCK),
+ ash::vk::Format::ASTC_10X10_UNORM_BLOCK => Ok(Self::ASTC_10x10_UNORM_BLOCK),
+ ash::vk::Format::ASTC_10X10_SRGB_BLOCK => Ok(Self::ASTC_10x10_SRGB_BLOCK),
+ ash::vk::Format::ASTC_12X10_UNORM_BLOCK => Ok(Self::ASTC_12x10_UNORM_BLOCK),
+ ash::vk::Format::ASTC_12X10_SRGB_BLOCK => Ok(Self::ASTC_12x10_SRGB_BLOCK),
+ ash::vk::Format::ASTC_12X12_UNORM_BLOCK => Ok(Self::ASTC_12x12_UNORM_BLOCK),
+ ash::vk::Format::ASTC_12X12_SRGB_BLOCK => Ok(Self::ASTC_12x12_SRGB_BLOCK),
+ ash::vk::Format::G8B8G8R8_422_UNORM => Ok(Self::G8B8G8R8_422_UNORM),
+ ash::vk::Format::B8G8R8G8_422_UNORM => Ok(Self::B8G8R8G8_422_UNORM),
+ ash::vk::Format::G8_B8_R8_3PLANE_420_UNORM => Ok(Self::G8_B8_R8_3PLANE_420_UNORM),
+ ash::vk::Format::G8_B8R8_2PLANE_420_UNORM => Ok(Self::G8_B8R8_2PLANE_420_UNORM),
+ ash::vk::Format::G8_B8_R8_3PLANE_422_UNORM => Ok(Self::G8_B8_R8_3PLANE_422_UNORM),
+ ash::vk::Format::G8_B8R8_2PLANE_422_UNORM => Ok(Self::G8_B8R8_2PLANE_422_UNORM),
+ ash::vk::Format::G8_B8_R8_3PLANE_444_UNORM => Ok(Self::G8_B8_R8_3PLANE_444_UNORM),
+ ash::vk::Format::R10X6_UNORM_PACK16 => Ok(Self::R10X6_UNORM_PACK16),
+ ash::vk::Format::R10X6G10X6_UNORM_2PACK16 => Ok(Self::R10X6G10X6_UNORM_2PACK16),
+ ash::vk::Format::R10X6G10X6B10X6A10X6_UNORM_4PACK16 => {
+ Ok(Self::R10X6G10X6B10X6A10X6_UNORM_4PACK16)
+ }
+ ash::vk::Format::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => {
+ Ok(Self::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16)
+ }
+ ash::vk::Format::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => {
+ Ok(Self::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16)
+ }
+ ash::vk::Format::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => {
+ Ok(Self::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16)
+ }
+ ash::vk::Format::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => {
+ Ok(Self::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16)
+ }
+ ash::vk::Format::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => {
+ Ok(Self::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16)
+ }
+ ash::vk::Format::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => {
+ Ok(Self::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16)
+ }
+ ash::vk::Format::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 => {
+ Ok(Self::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16)
+ }
+ ash::vk::Format::R12X4_UNORM_PACK16 => Ok(Self::R12X4_UNORM_PACK16),
+ ash::vk::Format::R12X4G12X4_UNORM_2PACK16 => Ok(Self::R12X4G12X4_UNORM_2PACK16),
+ ash::vk::Format::R12X4G12X4B12X4A12X4_UNORM_4PACK16 => {
+ Ok(Self::R12X4G12X4B12X4A12X4_UNORM_4PACK16)
+ }
+ ash::vk::Format::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => {
+ Ok(Self::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16)
+ }
+ ash::vk::Format::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => {
+ Ok(Self::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16)
+ }
+ ash::vk::Format::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => {
+ Ok(Self::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16)
+ }
+ ash::vk::Format::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => {
+ Ok(Self::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16)
+ }
+ ash::vk::Format::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => {
+ Ok(Self::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16)
+ }
+ ash::vk::Format::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => {
+ Ok(Self::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16)
+ }
+ ash::vk::Format::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 => {
+ Ok(Self::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16)
+ }
+ ash::vk::Format::G16B16G16R16_422_UNORM => Ok(Self::G16B16G16R16_422_UNORM),
+ ash::vk::Format::B16G16R16G16_422_UNORM => Ok(Self::B16G16R16G16_422_UNORM),
+ ash::vk::Format::G16_B16_R16_3PLANE_420_UNORM => Ok(Self::G16_B16_R16_3PLANE_420_UNORM),
+ ash::vk::Format::G16_B16R16_2PLANE_420_UNORM => Ok(Self::G16_B16R16_2PLANE_420_UNORM),
+ ash::vk::Format::G16_B16_R16_3PLANE_422_UNORM => Ok(Self::G16_B16_R16_3PLANE_422_UNORM),
+ ash::vk::Format::G16_B16R16_2PLANE_422_UNORM => Ok(Self::G16_B16R16_2PLANE_422_UNORM),
+ ash::vk::Format::G16_B16_R16_3PLANE_444_UNORM => Ok(Self::G16_B16_R16_3PLANE_444_UNORM),
+ ash::vk::Format::PVRTC1_2BPP_UNORM_BLOCK_IMG => Ok(Self::PVRTC1_2BPP_UNORM_BLOCK),
+ ash::vk::Format::PVRTC1_4BPP_UNORM_BLOCK_IMG => Ok(Self::PVRTC1_4BPP_UNORM_BLOCK),
+ ash::vk::Format::PVRTC2_2BPP_UNORM_BLOCK_IMG => Ok(Self::PVRTC2_2BPP_UNORM_BLOCK),
+ ash::vk::Format::PVRTC2_4BPP_UNORM_BLOCK_IMG => Ok(Self::PVRTC2_4BPP_UNORM_BLOCK),
+ ash::vk::Format::PVRTC1_2BPP_SRGB_BLOCK_IMG => Ok(Self::PVRTC1_2BPP_SRGB_BLOCK),
+ ash::vk::Format::PVRTC1_4BPP_SRGB_BLOCK_IMG => Ok(Self::PVRTC1_4BPP_SRGB_BLOCK),
+ ash::vk::Format::PVRTC2_2BPP_SRGB_BLOCK_IMG => Ok(Self::PVRTC2_2BPP_SRGB_BLOCK),
+ ash::vk::Format::PVRTC2_4BPP_SRGB_BLOCK_IMG => Ok(Self::PVRTC2_4BPP_SRGB_BLOCK),
+ ash::vk::Format::ASTC_4X4_SFLOAT_BLOCK => Ok(Self::ASTC_4x4_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_5X4_SFLOAT_BLOCK => Ok(Self::ASTC_5x4_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_5X5_SFLOAT_BLOCK => Ok(Self::ASTC_5x5_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_6X5_SFLOAT_BLOCK => Ok(Self::ASTC_6x5_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_6X6_SFLOAT_BLOCK => Ok(Self::ASTC_6x6_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_8X5_SFLOAT_BLOCK => Ok(Self::ASTC_8x5_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_8X6_SFLOAT_BLOCK => Ok(Self::ASTC_8x6_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_8X8_SFLOAT_BLOCK => Ok(Self::ASTC_8x8_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_10X5_SFLOAT_BLOCK => Ok(Self::ASTC_10x5_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_10X6_SFLOAT_BLOCK => Ok(Self::ASTC_10x6_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_10X8_SFLOAT_BLOCK => Ok(Self::ASTC_10x8_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_10X10_SFLOAT_BLOCK => Ok(Self::ASTC_10x10_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_12X10_SFLOAT_BLOCK => Ok(Self::ASTC_12x10_SFLOAT_BLOCK),
+ ash::vk::Format::ASTC_12X12_SFLOAT_BLOCK => Ok(Self::ASTC_12x12_SFLOAT_BLOCK),
+ ash::vk::Format::G8_B8R8_2PLANE_444_UNORM => Ok(Self::G8_B8R8_2PLANE_444_UNORM),
+ ash::vk::Format::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 => {
+ Ok(Self::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16)
+ }
+ ash::vk::Format::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 => {
+ Ok(Self::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16)
+ }
+ ash::vk::Format::G16_B16R16_2PLANE_444_UNORM => Ok(Self::G16_B16R16_2PLANE_444_UNORM),
+ ash::vk::Format::A4R4G4B4_UNORM_PACK16 => Ok(Self::A4R4G4B4_UNORM_PACK16),
+ ash::vk::Format::A4B4G4R4_UNORM_PACK16 => Ok(Self::A4B4G4R4_UNORM_PACK16),
+ ash::vk::Format::R16G16_S10_5_NV => Ok(Self::R16G16_S10_5_NV),
+ _ => Err(()),
+ }
+ }
+}
+#[doc = r" Converts a format enum identifier to a standard Rust type that is suitable for"]
+#[doc = r" representing the format in a buffer or image."]
+#[doc = r""]
+#[doc = r" This macro returns one possible suitable representation, but there are usually other"]
+#[doc = r" possibilities for a given format. A compile error occurs for formats that have no"]
+#[doc = r" well-defined size (the `size` method returns `None`)."]
+#[doc = r""]
+#[doc = r" - For regular unpacked formats with one component, this returns a single floating point,"]
+#[doc = r" signed or unsigned integer with the appropriate number of bits. For formats with"]
+#[doc = r" multiple components, an array is returned."]
+#[doc = r" - For packed formats, this returns an unsigned integer with the size of the packed"]
+#[doc = r" element. For multi-packed formats (such as `2PACK16`), an array is returned."]
+#[doc = r" - For compressed formats, this returns `[u8; N]` where N is the size of a block."]
+#[doc = r""]
+#[doc = r" Note: for 16-bit floating point values, you need to import the [`half::f16`] type."]
+#[doc = r""]
+#[doc = r" # Examples"]
+#[doc = r""]
+#[doc = r" For arrays:"]
+#[doc = r""]
+#[doc = r" ```"]
+#[doc = r" # use vulkano::type_for_format;"]
+#[doc = r" let pixel: type_for_format!(R32G32B32A32_SFLOAT);"]
+#[doc = r" pixel = [1.0f32, 0.0, 0.0, 1.0];"]
+#[doc = r" ```"]
+#[doc = r""]
+#[doc = r" For [`cgmath`]:"]
+#[doc = r""]
+#[doc = r" ```"]
+#[doc = r" # use vulkano::type_for_format;"]
+#[doc = r" let pixel: type_for_format!(cgmath, R32G32B32A32_SFLOAT);"]
+#[doc = r" pixel = cgmath::Vector4::new(1.0f32, 0.0, 0.0, 1.0);"]
+#[doc = r" ```"]
+#[doc = r""]
+#[doc = r" For [`nalgebra`]:"]
+#[doc = r""]
+#[doc = r" ```"]
+#[doc = r" # use vulkano::type_for_format;"]
+#[doc = r" let pixel: type_for_format!(nalgebra, R32G32B32A32_SFLOAT);"]
+#[doc = r" pixel = nalgebra::vector![1.0f32, 0.0, 0.0, 1.0];"]
+#[doc = r" ```"]
+#[doc = r""]
+#[doc = r" [`cgmath`]: https://crates.io/crates/cgmath"]
+#[doc = r" [`nalgebra`]: https://crates.io/crates/nalgebra"]
+#[macro_export]
+macro_rules ! type_for_format { (R4G4_UNORM_PACK8) => { u8 } ; (R4G4B4A4_UNORM_PACK16) => { u16 } ; (B4G4R4A4_UNORM_PACK16) => { u16 } ; (R5G6B5_UNORM_PACK16) => { u16 } ; (B5G6R5_UNORM_PACK16) => { u16 } ; (R5G5B5A1_UNORM_PACK16) => { u16 } ; (B5G5R5A1_UNORM_PACK16) => { u16 } ; (A1R5G5B5_UNORM_PACK16) => { u16 } ; (R8_UNORM) => { u8 } ; (R8_SNORM) => { i8 } ; (R8_USCALED) => { u8 } ; (R8_SSCALED) => { i8 } ; (R8_UINT) => { u8 } ; (R8_SINT) => { i8 } ; (R8_SRGB) => { u8 } ; (R8G8_UNORM) => { [u8 ; 2] } ; (R8G8_SNORM) => { [i8 ; 2] } ; (R8G8_USCALED) => { [u8 ; 2] } ; (R8G8_SSCALED) => { [i8 ; 2] } ; (R8G8_UINT) => { [u8 ; 2] } ; (R8G8_SINT) => { [i8 ; 2] } ; (R8G8_SRGB) => { [u8 ; 2] } ; (R8G8B8_UNORM) => { [u8 ; 3] } ; (R8G8B8_SNORM) => { [i8 ; 3] } ; (R8G8B8_USCALED) => { [u8 ; 3] } ; (R8G8B8_SSCALED) => { [i8 ; 3] } ; (R8G8B8_UINT) => { [u8 ; 3] } ; (R8G8B8_SINT) => { [i8 ; 3] } ; (R8G8B8_SRGB) => { [u8 ; 3] } ; (B8G8R8_UNORM) => { [u8 ; 3] } ; (B8G8R8_SNORM) => { [i8 ; 3] } ; (B8G8R8_USCALED) => { [u8 ; 3] } ; (B8G8R8_SSCALED) => { [i8 ; 3] } ; (B8G8R8_UINT) => { [u8 ; 3] } ; (B8G8R8_SINT) => { [i8 ; 3] } ; (B8G8R8_SRGB) => { [u8 ; 3] } ; (R8G8B8A8_UNORM) => { [u8 ; 4] } ; (R8G8B8A8_SNORM) => { [i8 ; 4] } ; (R8G8B8A8_USCALED) => { [u8 ; 4] } ; (R8G8B8A8_SSCALED) => { [i8 ; 4] } ; (R8G8B8A8_UINT) => { [u8 ; 4] } ; (R8G8B8A8_SINT) => { [i8 ; 4] } ; (R8G8B8A8_SRGB) => { [u8 ; 4] } ; (B8G8R8A8_UNORM) => { [u8 ; 4] } ; (B8G8R8A8_SNORM) => { [i8 ; 4] } ; (B8G8R8A8_USCALED) => { [u8 ; 4] } ; (B8G8R8A8_SSCALED) => { [i8 ; 4] } ; (B8G8R8A8_UINT) => { [u8 ; 4] } ; (B8G8R8A8_SINT) => { [i8 ; 4] } ; (B8G8R8A8_SRGB) => { [u8 ; 4] } ; (A8B8G8R8_UNORM_PACK32) => { u32 } ; (A8B8G8R8_SNORM_PACK32) => { u32 } ; (A8B8G8R8_USCALED_PACK32) => { u32 } ; (A8B8G8R8_SSCALED_PACK32) => { u32 } ; (A8B8G8R8_UINT_PACK32) => { u32 } ; (A8B8G8R8_SINT_PACK32) => { u32 } ; (A8B8G8R8_SRGB_PACK32) => { u32 } ; (A2R10G10B10_UNORM_PACK32) => { u32 } ; (A2R10G10B10_SNORM_PACK32) => { u32 } ; (A2R10G10B10_USCALED_PACK32) => { u32 } ; (A2R10G10B10_SSCALED_PACK32) => { u32 } ; (A2R10G10B10_UINT_PACK32) => { u32 } ; (A2R10G10B10_SINT_PACK32) => { u32 } ; (A2B10G10R10_UNORM_PACK32) => { u32 } ; (A2B10G10R10_SNORM_PACK32) => { u32 } ; (A2B10G10R10_USCALED_PACK32) => { u32 } ; (A2B10G10R10_SSCALED_PACK32) => { u32 } ; (A2B10G10R10_UINT_PACK32) => { u32 } ; (A2B10G10R10_SINT_PACK32) => { u32 } ; (R16_UNORM) => { u16 } ; (R16_SNORM) => { i16 } ; (R16_USCALED) => { u16 } ; (R16_SSCALED) => { i16 } ; (R16_UINT) => { u16 } ; (R16_SINT) => { i16 } ; (R16_SFLOAT) => { f16 } ; (R16G16_UNORM) => { [u16 ; 2] } ; (R16G16_SNORM) => { [i16 ; 2] } ; (R16G16_USCALED) => { [u16 ; 2] } ; (R16G16_SSCALED) => { [i16 ; 2] } ; (R16G16_UINT) => { [u16 ; 2] } ; (R16G16_SINT) => { [i16 ; 2] } ; (R16G16_SFLOAT) => { [f16 ; 2] } ; (R16G16B16_UNORM) => { [u16 ; 3] } ; (R16G16B16_SNORM) => { [i16 ; 3] } ; (R16G16B16_USCALED) => { [u16 ; 3] } ; (R16G16B16_SSCALED) => { [i16 ; 3] } ; (R16G16B16_UINT) => { [u16 ; 3] } ; (R16G16B16_SINT) => { [i16 ; 3] } ; (R16G16B16_SFLOAT) => { [f16 ; 3] } ; (R16G16B16A16_UNORM) => { [u16 ; 4] } ; (R16G16B16A16_SNORM) => { [i16 ; 4] } ; (R16G16B16A16_USCALED) => { [u16 ; 4] } ; (R16G16B16A16_SSCALED) => { [i16 ; 4] } ; (R16G16B16A16_UINT) => { [u16 ; 4] } ; (R16G16B16A16_SINT) => { [i16 ; 4] } ; (R16G16B16A16_SFLOAT) => { [f16 ; 4] } ; (R32_UINT) => { u32 } ; (R32_SINT) => { i32 } ; (R32_SFLOAT) => { f32 } ; (R32G32_UINT) => { [u32 ; 2] } ; (R32G32_SINT) => { [i32 ; 2] } ; (R32G32_SFLOAT) => { [f32 ; 2] } ; (R32G32B32_UINT) => { [u32 ; 3] } ; (R32G32B32_SINT) => { [i32 ; 3] } ; (R32G32B32_SFLOAT) => { [f32 ; 3] } ; (R32G32B32A32_UINT) => { [u32 ; 4] } ; (R32G32B32A32_SINT) => { [i32 ; 4] } ; (R32G32B32A32_SFLOAT) => { [f32 ; 4] } ; (R64_UINT) => { u64 } ; (R64_SINT) => { i64 } ; (R64_SFLOAT) => { f64 } ; (R64G64_UINT) => { [u64 ; 2] } ; (R64G64_SINT) => { [i64 ; 2] } ; (R64G64_SFLOAT) => { [f64 ; 2] } ; (R64G64B64_UINT) => { [u64 ; 3] } ; (R64G64B64_SINT) => { [i64 ; 3] } ; (R64G64B64_SFLOAT) => { [f64 ; 3] } ; (R64G64B64A64_UINT) => { [u64 ; 4] } ; (R64G64B64A64_SINT) => { [i64 ; 4] } ; (R64G64B64A64_SFLOAT) => { [f64 ; 4] } ; (B10G11R11_UFLOAT_PACK32) => { u32 } ; (E5B9G9R9_UFLOAT_PACK32) => { u32 } ; (BC1_RGB_UNORM_BLOCK) => { [u8 ; 8] } ; (BC1_RGB_SRGB_BLOCK) => { [u8 ; 8] } ; (BC1_RGBA_UNORM_BLOCK) => { [u8 ; 8] } ; (BC1_RGBA_SRGB_BLOCK) => { [u8 ; 8] } ; (BC2_UNORM_BLOCK) => { [u8 ; 16] } ; (BC2_SRGB_BLOCK) => { [u8 ; 16] } ; (BC3_UNORM_BLOCK) => { [u8 ; 16] } ; (BC3_SRGB_BLOCK) => { [u8 ; 16] } ; (BC4_UNORM_BLOCK) => { [u8 ; 8] } ; (BC4_SNORM_BLOCK) => { [u8 ; 8] } ; (BC5_UNORM_BLOCK) => { [u8 ; 16] } ; (BC5_SNORM_BLOCK) => { [u8 ; 16] } ; (BC6H_UFLOAT_BLOCK) => { [u8 ; 16] } ; (BC6H_SFLOAT_BLOCK) => { [u8 ; 16] } ; (BC7_UNORM_BLOCK) => { [u8 ; 16] } ; (BC7_SRGB_BLOCK) => { [u8 ; 16] } ; (ETC2_R8G8B8_UNORM_BLOCK) => { [u8 ; 8] } ; (ETC2_R8G8B8_SRGB_BLOCK) => { [u8 ; 8] } ; (ETC2_R8G8B8A1_UNORM_BLOCK) => { [u8 ; 8] } ; (ETC2_R8G8B8A1_SRGB_BLOCK) => { [u8 ; 8] } ; (ETC2_R8G8B8A8_UNORM_BLOCK) => { [u8 ; 16] } ; (ETC2_R8G8B8A8_SRGB_BLOCK) => { [u8 ; 16] } ; (EAC_R11_UNORM_BLOCK) => { [u8 ; 8] } ; (EAC_R11_SNORM_BLOCK) => { [u8 ; 8] } ; (EAC_R11G11_UNORM_BLOCK) => { [u8 ; 16] } ; (EAC_R11G11_SNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_4x4_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_4x4_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_5x4_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_5x4_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_5x5_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_5x5_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_6x5_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_6x5_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_6x6_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_6x6_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_8x5_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_8x5_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_8x6_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_8x6_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_8x8_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_8x8_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_10x5_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_10x5_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_10x6_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_10x6_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_10x8_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_10x8_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_10x10_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_10x10_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_12x10_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_12x10_SRGB_BLOCK) => { [u8 ; 16] } ; (ASTC_12x12_UNORM_BLOCK) => { [u8 ; 16] } ; (ASTC_12x12_SRGB_BLOCK) => { [u8 ; 16] } ; (G8B8G8R8_422_UNORM) => { [u8 ; 4] } ; (B8G8R8G8_422_UNORM) => { [u8 ; 4] } ; (R10X6_UNORM_PACK16) => { u16 } ; (R10X6G10X6_UNORM_2PACK16) => { [u16 ; 2] } ; (R10X6G10X6B10X6A10X6_UNORM_4PACK16) => { [u16 ; 4] } ; (G10X6B10X6G10X6R10X6_422_UNORM_4PACK16) => { [u16 ; 4] } ; (B10X6G10X6R10X6G10X6_422_UNORM_4PACK16) => { [u16 ; 4] } ; (R12X4_UNORM_PACK16) => { u16 } ; (R12X4G12X4_UNORM_2PACK16) => { [u16 ; 2] } ; (R12X4G12X4B12X4A12X4_UNORM_4PACK16) => { [u16 ; 4] } ; (G12X4B12X4G12X4R12X4_422_UNORM_4PACK16) => { [u16 ; 4] } ; (B12X4G12X4R12X4G12X4_422_UNORM_4PACK16) => { [u16 ; 4] } ; (G16B16G16R16_422_UNORM) => { [u16 ; 4] } ; (B16G16R16G16_422_UNORM) => { [u16 ; 4] } ; (PVRTC1_2BPP_UNORM_BLOCK) => { [u8 ; 8] } ; (PVRTC1_4BPP_UNORM_BLOCK) => { [u8 ; 8] } ; (PVRTC2_2BPP_UNORM_BLOCK) => { [u8 ; 8] } ; (PVRTC2_4BPP_UNORM_BLOCK) => { [u8 ; 8] } ; (PVRTC1_2BPP_SRGB_BLOCK) => { [u8 ; 8] } ; (PVRTC1_4BPP_SRGB_BLOCK) => { [u8 ; 8] } ; (PVRTC2_2BPP_SRGB_BLOCK) => { [u8 ; 8] } ; (PVRTC2_4BPP_SRGB_BLOCK) => { [u8 ; 8] } ; (ASTC_4x4_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_5x4_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_5x5_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_6x5_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_6x6_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_8x5_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_8x6_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_8x8_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_10x5_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_10x6_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_10x8_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_10x10_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_12x10_SFLOAT_BLOCK) => { [u8 ; 16] } ; (ASTC_12x12_SFLOAT_BLOCK) => { [u8 ; 16] } ; (A4R4G4B4_UNORM_PACK16) => { u16 } ; (A4B4G4R4_UNORM_PACK16) => { u16 } ; (R16G16_S10_5_NV) => { [i16 ; 2] } ; (cgmath , R4G4_UNORM_PACK8) => { u8 } ; (cgmath , R4G4B4A4_UNORM_PACK16) => { u16 } ; (cgmath , B4G4R4A4_UNORM_PACK16) => { u16 } ; (cgmath , R5G6B5_UNORM_PACK16) => { u16 } ; (cgmath , B5G6R5_UNORM_PACK16) => { u16 } ; (cgmath , R5G5B5A1_UNORM_PACK16) => { u16 } ; (cgmath , B5G5R5A1_UNORM_PACK16) => { u16 } ; (cgmath , A1R5G5B5_UNORM_PACK16) => { u16 } ; (cgmath , R8_UNORM) => { u8 } ; (cgmath , R8_SNORM) => { i8 } ; (cgmath , R8_USCALED) => { u8 } ; (cgmath , R8_SSCALED) => { i8 } ; (cgmath , R8_UINT) => { u8 } ; (cgmath , R8_SINT) => { i8 } ; (cgmath , R8_SRGB) => { u8 } ; (cgmath , R8G8_UNORM) => { cgmath :: Vector2 < u8 > } ; (cgmath , R8G8_SNORM) => { cgmath :: Vector2 < i8 > } ; (cgmath , R8G8_USCALED) => { cgmath :: Vector2 < u8 > } ; (cgmath , R8G8_SSCALED) => { cgmath :: Vector2 < i8 > } ; (cgmath , R8G8_UINT) => { cgmath :: Vector2 < u8 > } ; (cgmath , R8G8_SINT) => { cgmath :: Vector2 < i8 > } ; (cgmath , R8G8_SRGB) => { cgmath :: Vector2 < u8 > } ; (cgmath , R8G8B8_UNORM) => { cgmath :: Vector3 < u8 > } ; (cgmath , R8G8B8_SNORM) => { cgmath :: Vector3 < i8 > } ; (cgmath , R8G8B8_USCALED) => { cgmath :: Vector3 < u8 > } ; (cgmath , R8G8B8_SSCALED) => { cgmath :: Vector3 < i8 > } ; (cgmath , R8G8B8_UINT) => { cgmath :: Vector3 < u8 > } ; (cgmath , R8G8B8_SINT) => { cgmath :: Vector3 < i8 > } ; (cgmath , R8G8B8_SRGB) => { cgmath :: Vector3 < u8 > } ; (cgmath , B8G8R8_UNORM) => { cgmath :: Vector3 < u8 > } ; (cgmath , B8G8R8_SNORM) => { cgmath :: Vector3 < i8 > } ; (cgmath , B8G8R8_USCALED) => { cgmath :: Vector3 < u8 > } ; (cgmath , B8G8R8_SSCALED) => { cgmath :: Vector3 < i8 > } ; (cgmath , B8G8R8_UINT) => { cgmath :: Vector3 < u8 > } ; (cgmath , B8G8R8_SINT) => { cgmath :: Vector3 < i8 > } ; (cgmath , B8G8R8_SRGB) => { cgmath :: Vector3 < u8 > } ; (cgmath , R8G8B8A8_UNORM) => { cgmath :: Vector4 < u8 > } ; (cgmath , R8G8B8A8_SNORM) => { cgmath :: Vector4 < i8 > } ; (cgmath , R8G8B8A8_USCALED) => { cgmath :: Vector4 < u8 > } ; (cgmath , R8G8B8A8_SSCALED) => { cgmath :: Vector4 < i8 > } ; (cgmath , R8G8B8A8_UINT) => { cgmath :: Vector4 < u8 > } ; (cgmath , R8G8B8A8_SINT) => { cgmath :: Vector4 < i8 > } ; (cgmath , R8G8B8A8_SRGB) => { cgmath :: Vector4 < u8 > } ; (cgmath , B8G8R8A8_UNORM) => { cgmath :: Vector4 < u8 > } ; (cgmath , B8G8R8A8_SNORM) => { cgmath :: Vector4 < i8 > } ; (cgmath , B8G8R8A8_USCALED) => { cgmath :: Vector4 < u8 > } ; (cgmath , B8G8R8A8_SSCALED) => { cgmath :: Vector4 < i8 > } ; (cgmath , B8G8R8A8_UINT) => { cgmath :: Vector4 < u8 > } ; (cgmath , B8G8R8A8_SINT) => { cgmath :: Vector4 < i8 > } ; (cgmath , B8G8R8A8_SRGB) => { cgmath :: Vector4 < u8 > } ; (cgmath , A8B8G8R8_UNORM_PACK32) => { u32 } ; (cgmath , A8B8G8R8_SNORM_PACK32) => { u32 } ; (cgmath , A8B8G8R8_USCALED_PACK32) => { u32 } ; (cgmath , A8B8G8R8_SSCALED_PACK32) => { u32 } ; (cgmath , A8B8G8R8_UINT_PACK32) => { u32 } ; (cgmath , A8B8G8R8_SINT_PACK32) => { u32 } ; (cgmath , A8B8G8R8_SRGB_PACK32) => { u32 } ; (cgmath , A2R10G10B10_UNORM_PACK32) => { u32 } ; (cgmath , A2R10G10B10_SNORM_PACK32) => { u32 } ; (cgmath , A2R10G10B10_USCALED_PACK32) => { u32 } ; (cgmath , A2R10G10B10_SSCALED_PACK32) => { u32 } ; (cgmath , A2R10G10B10_UINT_PACK32) => { u32 } ; (cgmath , A2R10G10B10_SINT_PACK32) => { u32 } ; (cgmath , A2B10G10R10_UNORM_PACK32) => { u32 } ; (cgmath , A2B10G10R10_SNORM_PACK32) => { u32 } ; (cgmath , A2B10G10R10_USCALED_PACK32) => { u32 } ; (cgmath , A2B10G10R10_SSCALED_PACK32) => { u32 } ; (cgmath , A2B10G10R10_UINT_PACK32) => { u32 } ; (cgmath , A2B10G10R10_SINT_PACK32) => { u32 } ; (cgmath , R16_UNORM) => { u16 } ; (cgmath , R16_SNORM) => { i16 } ; (cgmath , R16_USCALED) => { u16 } ; (cgmath , R16_SSCALED) => { i16 } ; (cgmath , R16_UINT) => { u16 } ; (cgmath , R16_SINT) => { i16 } ; (cgmath , R16_SFLOAT) => { f16 } ; (cgmath , R16G16_UNORM) => { cgmath :: Vector2 < u16 > } ; (cgmath , R16G16_SNORM) => { cgmath :: Vector2 < i16 > } ; (cgmath , R16G16_USCALED) => { cgmath :: Vector2 < u16 > } ; (cgmath , R16G16_SSCALED) => { cgmath :: Vector2 < i16 > } ; (cgmath , R16G16_UINT) => { cgmath :: Vector2 < u16 > } ; (cgmath , R16G16_SINT) => { cgmath :: Vector2 < i16 > } ; (cgmath , R16G16_SFLOAT) => { cgmath :: Vector2 < f16 > } ; (cgmath , R16G16B16_UNORM) => { cgmath :: Vector3 < u16 > } ; (cgmath , R16G16B16_SNORM) => { cgmath :: Vector3 < i16 > } ; (cgmath , R16G16B16_USCALED) => { cgmath :: Vector3 < u16 > } ; (cgmath , R16G16B16_SSCALED) => { cgmath :: Vector3 < i16 > } ; (cgmath , R16G16B16_UINT) => { cgmath :: Vector3 < u16 > } ; (cgmath , R16G16B16_SINT) => { cgmath :: Vector3 < i16 > } ; (cgmath , R16G16B16_SFLOAT) => { cgmath :: Vector3 < f16 > } ; (cgmath , R16G16B16A16_UNORM) => { cgmath :: Vector4 < u16 > } ; (cgmath , R16G16B16A16_SNORM) => { cgmath :: Vector4 < i16 > } ; (cgmath , R16G16B16A16_USCALED) => { cgmath :: Vector4 < u16 > } ; (cgmath , R16G16B16A16_SSCALED) => { cgmath :: Vector4 < i16 > } ; (cgmath , R16G16B16A16_UINT) => { cgmath :: Vector4 < u16 > } ; (cgmath , R16G16B16A16_SINT) => { cgmath :: Vector4 < i16 > } ; (cgmath , R16G16B16A16_SFLOAT) => { cgmath :: Vector4 < f16 > } ; (cgmath , R32_UINT) => { u32 } ; (cgmath , R32_SINT) => { i32 } ; (cgmath , R32_SFLOAT) => { f32 } ; (cgmath , R32G32_UINT) => { cgmath :: Vector2 < u32 > } ; (cgmath , R32G32_SINT) => { cgmath :: Vector2 < i32 > } ; (cgmath , R32G32_SFLOAT) => { cgmath :: Vector2 < f32 > } ; (cgmath , R32G32B32_UINT) => { cgmath :: Vector3 < u32 > } ; (cgmath , R32G32B32_SINT) => { cgmath :: Vector3 < i32 > } ; (cgmath , R32G32B32_SFLOAT) => { cgmath :: Vector3 < f32 > } ; (cgmath , R32G32B32A32_UINT) => { cgmath :: Vector4 < u32 > } ; (cgmath , R32G32B32A32_SINT) => { cgmath :: Vector4 < i32 > } ; (cgmath , R32G32B32A32_SFLOAT) => { cgmath :: Vector4 < f32 > } ; (cgmath , R64_UINT) => { u64 } ; (cgmath , R64_SINT) => { i64 } ; (cgmath , R64_SFLOAT) => { f64 } ; (cgmath , R64G64_UINT) => { cgmath :: Vector2 < u64 > } ; (cgmath , R64G64_SINT) => { cgmath :: Vector2 < i64 > } ; (cgmath , R64G64_SFLOAT) => { cgmath :: Vector2 < f64 > } ; (cgmath , R64G64B64_UINT) => { cgmath :: Vector3 < u64 > } ; (cgmath , R64G64B64_SINT) => { cgmath :: Vector3 < i64 > } ; (cgmath , R64G64B64_SFLOAT) => { cgmath :: Vector3 < f64 > } ; (cgmath , R64G64B64A64_UINT) => { cgmath :: Vector4 < u64 > } ; (cgmath , R64G64B64A64_SINT) => { cgmath :: Vector4 < i64 > } ; (cgmath , R64G64B64A64_SFLOAT) => { cgmath :: Vector4 < f64 > } ; (cgmath , B10G11R11_UFLOAT_PACK32) => { u32 } ; (cgmath , E5B9G9R9_UFLOAT_PACK32) => { u32 } ; (cgmath , BC1_RGB_UNORM_BLOCK) => { [u8 ; 8] } ; (cgmath , BC1_RGB_SRGB_BLOCK) => { [u8 ; 8] } ; (cgmath , BC1_RGBA_UNORM_BLOCK) => { [u8 ; 8] } ; (cgmath , BC1_RGBA_SRGB_BLOCK) => { [u8 ; 8] } ; (cgmath , BC2_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , BC2_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , BC3_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , BC3_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , BC4_UNORM_BLOCK) => { [u8 ; 8] } ; (cgmath , BC4_SNORM_BLOCK) => { [u8 ; 8] } ; (cgmath , BC5_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , BC5_SNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , BC6H_UFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , BC6H_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , BC7_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , BC7_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ETC2_R8G8B8_UNORM_BLOCK) => { [u8 ; 8] } ; (cgmath , ETC2_R8G8B8_SRGB_BLOCK) => { [u8 ; 8] } ; (cgmath , ETC2_R8G8B8A1_UNORM_BLOCK) => { [u8 ; 8] } ; (cgmath , ETC2_R8G8B8A1_SRGB_BLOCK) => { [u8 ; 8] } ; (cgmath , ETC2_R8G8B8A8_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ETC2_R8G8B8A8_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , EAC_R11_UNORM_BLOCK) => { [u8 ; 8] } ; (cgmath , EAC_R11_SNORM_BLOCK) => { [u8 ; 8] } ; (cgmath , EAC_R11G11_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , EAC_R11G11_SNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_4x4_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_4x4_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_5x4_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_5x4_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_5x5_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_5x5_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_6x5_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_6x5_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_6x6_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_6x6_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_8x5_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_8x5_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_8x6_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_8x6_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_8x8_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_8x8_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_10x5_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_10x5_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_10x6_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_10x6_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_10x8_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_10x8_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_10x10_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_10x10_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_12x10_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_12x10_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_12x12_UNORM_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_12x12_SRGB_BLOCK) => { [u8 ; 16] } ; (cgmath , G8B8G8R8_422_UNORM) => { cgmath :: Vector4 < u8 > } ; (cgmath , B8G8R8G8_422_UNORM) => { cgmath :: Vector4 < u8 > } ; (cgmath , R10X6_UNORM_PACK16) => { u16 } ; (cgmath , R10X6G10X6_UNORM_2PACK16) => { [u16 ; 2] } ; (cgmath , R10X6G10X6B10X6A10X6_UNORM_4PACK16) => { [u16 ; 4] } ; (cgmath , G10X6B10X6G10X6R10X6_422_UNORM_4PACK16) => { [u16 ; 4] } ; (cgmath , B10X6G10X6R10X6G10X6_422_UNORM_4PACK16) => { [u16 ; 4] } ; (cgmath , R12X4_UNORM_PACK16) => { u16 } ; (cgmath , R12X4G12X4_UNORM_2PACK16) => { [u16 ; 2] } ; (cgmath , R12X4G12X4B12X4A12X4_UNORM_4PACK16) => { [u16 ; 4] } ; (cgmath , G12X4B12X4G12X4R12X4_422_UNORM_4PACK16) => { [u16 ; 4] } ; (cgmath , B12X4G12X4R12X4G12X4_422_UNORM_4PACK16) => { [u16 ; 4] } ; (cgmath , G16B16G16R16_422_UNORM) => { cgmath :: Vector4 < u16 > } ; (cgmath , B16G16R16G16_422_UNORM) => { cgmath :: Vector4 < u16 > } ; (cgmath , PVRTC1_2BPP_UNORM_BLOCK) => { [u8 ; 8] } ; (cgmath , PVRTC1_4BPP_UNORM_BLOCK) => { [u8 ; 8] } ; (cgmath , PVRTC2_2BPP_UNORM_BLOCK) => { [u8 ; 8] } ; (cgmath , PVRTC2_4BPP_UNORM_BLOCK) => { [u8 ; 8] } ; (cgmath , PVRTC1_2BPP_SRGB_BLOCK) => { [u8 ; 8] } ; (cgmath , PVRTC1_4BPP_SRGB_BLOCK) => { [u8 ; 8] } ; (cgmath , PVRTC2_2BPP_SRGB_BLOCK) => { [u8 ; 8] } ; (cgmath , PVRTC2_4BPP_SRGB_BLOCK) => { [u8 ; 8] } ; (cgmath , ASTC_4x4_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_5x4_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_5x5_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_6x5_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_6x6_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_8x5_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_8x6_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_8x8_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_10x5_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_10x6_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_10x8_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_10x10_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_12x10_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , ASTC_12x12_SFLOAT_BLOCK) => { [u8 ; 16] } ; (cgmath , A4R4G4B4_UNORM_PACK16) => { u16 } ; (cgmath , A4B4G4R4_UNORM_PACK16) => { u16 } ; (cgmath , R16G16_S10_5_NV) => { cgmath :: Vector2 < i16 > } ; (nalgebra , R4G4_UNORM_PACK8) => { u8 } ; (nalgebra , R4G4B4A4_UNORM_PACK16) => { u16 } ; (nalgebra , B4G4R4A4_UNORM_PACK16) => { u16 } ; (nalgebra , R5G6B5_UNORM_PACK16) => { u16 } ; (nalgebra , B5G6R5_UNORM_PACK16) => { u16 } ; (nalgebra , R5G5B5A1_UNORM_PACK16) => { u16 } ; (nalgebra , B5G5R5A1_UNORM_PACK16) => { u16 } ; (nalgebra , A1R5G5B5_UNORM_PACK16) => { u16 } ; (nalgebra , R8_UNORM) => { u8 } ; (nalgebra , R8_SNORM) => { i8 } ; (nalgebra , R8_USCALED) => { u8 } ; (nalgebra , R8_SSCALED) => { i8 } ; (nalgebra , R8_UINT) => { u8 } ; (nalgebra , R8_SINT) => { i8 } ; (nalgebra , R8_SRGB) => { u8 } ; (nalgebra , R8G8_UNORM) => { nalgebra :: base :: SVector < u8 , 2usize > } ; (nalgebra , R8G8_SNORM) => { nalgebra :: base :: SVector < i8 , 2usize > } ; (nalgebra , R8G8_USCALED) => { nalgebra :: base :: SVector < u8 , 2usize > } ; (nalgebra , R8G8_SSCALED) => { nalgebra :: base :: SVector < i8 , 2usize > } ; (nalgebra , R8G8_UINT) => { nalgebra :: base :: SVector < u8 , 2usize > } ; (nalgebra , R8G8_SINT) => { nalgebra :: base :: SVector < i8 , 2usize > } ; (nalgebra , R8G8_SRGB) => { nalgebra :: base :: SVector < u8 , 2usize > } ; (nalgebra , R8G8B8_UNORM) => { nalgebra :: base :: SVector < u8 , 3usize > } ; (nalgebra , R8G8B8_SNORM) => { nalgebra :: base :: SVector < i8 , 3usize > } ; (nalgebra , R8G8B8_USCALED) => { nalgebra :: base :: SVector < u8 , 3usize > } ; (nalgebra , R8G8B8_SSCALED) => { nalgebra :: base :: SVector < i8 , 3usize > } ; (nalgebra , R8G8B8_UINT) => { nalgebra :: base :: SVector < u8 , 3usize > } ; (nalgebra , R8G8B8_SINT) => { nalgebra :: base :: SVector < i8 , 3usize > } ; (nalgebra , R8G8B8_SRGB) => { nalgebra :: base :: SVector < u8 , 3usize > } ; (nalgebra , B8G8R8_UNORM) => { nalgebra :: base :: SVector < u8 , 3usize > } ; (nalgebra , B8G8R8_SNORM) => { nalgebra :: base :: SVector < i8 , 3usize > } ; (nalgebra , B8G8R8_USCALED) => { nalgebra :: base :: SVector < u8 , 3usize > } ; (nalgebra , B8G8R8_SSCALED) => { nalgebra :: base :: SVector < i8 , 3usize > } ; (nalgebra , B8G8R8_UINT) => { nalgebra :: base :: SVector < u8 , 3usize > } ; (nalgebra , B8G8R8_SINT) => { nalgebra :: base :: SVector < i8 , 3usize > } ; (nalgebra , B8G8R8_SRGB) => { nalgebra :: base :: SVector < u8 , 3usize > } ; (nalgebra , R8G8B8A8_UNORM) => { nalgebra :: base :: SVector < u8 , 4usize > } ; (nalgebra , R8G8B8A8_SNORM) => { nalgebra :: base :: SVector < i8 , 4usize > } ; (nalgebra , R8G8B8A8_USCALED) => { nalgebra :: base :: SVector < u8 , 4usize > } ; (nalgebra , R8G8B8A8_SSCALED) => { nalgebra :: base :: SVector < i8 , 4usize > } ; (nalgebra , R8G8B8A8_UINT) => { nalgebra :: base :: SVector < u8 , 4usize > } ; (nalgebra , R8G8B8A8_SINT) => { nalgebra :: base :: SVector < i8 , 4usize > } ; (nalgebra , R8G8B8A8_SRGB) => { nalgebra :: base :: SVector < u8 , 4usize > } ; (nalgebra , B8G8R8A8_UNORM) => { nalgebra :: base :: SVector < u8 , 4usize > } ; (nalgebra , B8G8R8A8_SNORM) => { nalgebra :: base :: SVector < i8 , 4usize > } ; (nalgebra , B8G8R8A8_USCALED) => { nalgebra :: base :: SVector < u8 , 4usize > } ; (nalgebra , B8G8R8A8_SSCALED) => { nalgebra :: base :: SVector < i8 , 4usize > } ; (nalgebra , B8G8R8A8_UINT) => { nalgebra :: base :: SVector < u8 , 4usize > } ; (nalgebra , B8G8R8A8_SINT) => { nalgebra :: base :: SVector < i8 , 4usize > } ; (nalgebra , B8G8R8A8_SRGB) => { nalgebra :: base :: SVector < u8 , 4usize > } ; (nalgebra , A8B8G8R8_UNORM_PACK32) => { u32 } ; (nalgebra , A8B8G8R8_SNORM_PACK32) => { u32 } ; (nalgebra , A8B8G8R8_USCALED_PACK32) => { u32 } ; (nalgebra , A8B8G8R8_SSCALED_PACK32) => { u32 } ; (nalgebra , A8B8G8R8_UINT_PACK32) => { u32 } ; (nalgebra , A8B8G8R8_SINT_PACK32) => { u32 } ; (nalgebra , A8B8G8R8_SRGB_PACK32) => { u32 } ; (nalgebra , A2R10G10B10_UNORM_PACK32) => { u32 } ; (nalgebra , A2R10G10B10_SNORM_PACK32) => { u32 } ; (nalgebra , A2R10G10B10_USCALED_PACK32) => { u32 } ; (nalgebra , A2R10G10B10_SSCALED_PACK32) => { u32 } ; (nalgebra , A2R10G10B10_UINT_PACK32) => { u32 } ; (nalgebra , A2R10G10B10_SINT_PACK32) => { u32 } ; (nalgebra , A2B10G10R10_UNORM_PACK32) => { u32 } ; (nalgebra , A2B10G10R10_SNORM_PACK32) => { u32 } ; (nalgebra , A2B10G10R10_USCALED_PACK32) => { u32 } ; (nalgebra , A2B10G10R10_SSCALED_PACK32) => { u32 } ; (nalgebra , A2B10G10R10_UINT_PACK32) => { u32 } ; (nalgebra , A2B10G10R10_SINT_PACK32) => { u32 } ; (nalgebra , R16_UNORM) => { u16 } ; (nalgebra , R16_SNORM) => { i16 } ; (nalgebra , R16_USCALED) => { u16 } ; (nalgebra , R16_SSCALED) => { i16 } ; (nalgebra , R16_UINT) => { u16 } ; (nalgebra , R16_SINT) => { i16 } ; (nalgebra , R16_SFLOAT) => { f16 } ; (nalgebra , R16G16_UNORM) => { nalgebra :: base :: SVector < u16 , 2usize > } ; (nalgebra , R16G16_SNORM) => { nalgebra :: base :: SVector < i16 , 2usize > } ; (nalgebra , R16G16_USCALED) => { nalgebra :: base :: SVector < u16 , 2usize > } ; (nalgebra , R16G16_SSCALED) => { nalgebra :: base :: SVector < i16 , 2usize > } ; (nalgebra , R16G16_UINT) => { nalgebra :: base :: SVector < u16 , 2usize > } ; (nalgebra , R16G16_SINT) => { nalgebra :: base :: SVector < i16 , 2usize > } ; (nalgebra , R16G16_SFLOAT) => { nalgebra :: base :: SVector < f16 , 2usize > } ; (nalgebra , R16G16B16_UNORM) => { nalgebra :: base :: SVector < u16 , 3usize > } ; (nalgebra , R16G16B16_SNORM) => { nalgebra :: base :: SVector < i16 , 3usize > } ; (nalgebra , R16G16B16_USCALED) => { nalgebra :: base :: SVector < u16 , 3usize > } ; (nalgebra , R16G16B16_SSCALED) => { nalgebra :: base :: SVector < i16 , 3usize > } ; (nalgebra , R16G16B16_UINT) => { nalgebra :: base :: SVector < u16 , 3usize > } ; (nalgebra , R16G16B16_SINT) => { nalgebra :: base :: SVector < i16 , 3usize > } ; (nalgebra , R16G16B16_SFLOAT) => { nalgebra :: base :: SVector < f16 , 3usize > } ; (nalgebra , R16G16B16A16_UNORM) => { nalgebra :: base :: SVector < u16 , 4usize > } ; (nalgebra , R16G16B16A16_SNORM) => { nalgebra :: base :: SVector < i16 , 4usize > } ; (nalgebra , R16G16B16A16_USCALED) => { nalgebra :: base :: SVector < u16 , 4usize > } ; (nalgebra , R16G16B16A16_SSCALED) => { nalgebra :: base :: SVector < i16 , 4usize > } ; (nalgebra , R16G16B16A16_UINT) => { nalgebra :: base :: SVector < u16 , 4usize > } ; (nalgebra , R16G16B16A16_SINT) => { nalgebra :: base :: SVector < i16 , 4usize > } ; (nalgebra , R16G16B16A16_SFLOAT) => { nalgebra :: base :: SVector < f16 , 4usize > } ; (nalgebra , R32_UINT) => { u32 } ; (nalgebra , R32_SINT) => { i32 } ; (nalgebra , R32_SFLOAT) => { f32 } ; (nalgebra , R32G32_UINT) => { nalgebra :: base :: SVector < u32 , 2usize > } ; (nalgebra , R32G32_SINT) => { nalgebra :: base :: SVector < i32 , 2usize > } ; (nalgebra , R32G32_SFLOAT) => { nalgebra :: base :: SVector < f32 , 2usize > } ; (nalgebra , R32G32B32_UINT) => { nalgebra :: base :: SVector < u32 , 3usize > } ; (nalgebra , R32G32B32_SINT) => { nalgebra :: base :: SVector < i32 , 3usize > } ; (nalgebra , R32G32B32_SFLOAT) => { nalgebra :: base :: SVector < f32 , 3usize > } ; (nalgebra , R32G32B32A32_UINT) => { nalgebra :: base :: SVector < u32 , 4usize > } ; (nalgebra , R32G32B32A32_SINT) => { nalgebra :: base :: SVector < i32 , 4usize > } ; (nalgebra , R32G32B32A32_SFLOAT) => { nalgebra :: base :: SVector < f32 , 4usize > } ; (nalgebra , R64_UINT) => { u64 } ; (nalgebra , R64_SINT) => { i64 } ; (nalgebra , R64_SFLOAT) => { f64 } ; (nalgebra , R64G64_UINT) => { nalgebra :: base :: SVector < u64 , 2usize > } ; (nalgebra , R64G64_SINT) => { nalgebra :: base :: SVector < i64 , 2usize > } ; (nalgebra , R64G64_SFLOAT) => { nalgebra :: base :: SVector < f64 , 2usize > } ; (nalgebra , R64G64B64_UINT) => { nalgebra :: base :: SVector < u64 , 3usize > } ; (nalgebra , R64G64B64_SINT) => { nalgebra :: base :: SVector < i64 , 3usize > } ; (nalgebra , R64G64B64_SFLOAT) => { nalgebra :: base :: SVector < f64 , 3usize > } ; (nalgebra , R64G64B64A64_UINT) => { nalgebra :: base :: SVector < u64 , 4usize > } ; (nalgebra , R64G64B64A64_SINT) => { nalgebra :: base :: SVector < i64 , 4usize > } ; (nalgebra , R64G64B64A64_SFLOAT) => { nalgebra :: base :: SVector < f64 , 4usize > } ; (nalgebra , B10G11R11_UFLOAT_PACK32) => { u32 } ; (nalgebra , E5B9G9R9_UFLOAT_PACK32) => { u32 } ; (nalgebra , BC1_RGB_UNORM_BLOCK) => { [u8 ; 8] } ; (nalgebra , BC1_RGB_SRGB_BLOCK) => { [u8 ; 8] } ; (nalgebra , BC1_RGBA_UNORM_BLOCK) => { [u8 ; 8] } ; (nalgebra , BC1_RGBA_SRGB_BLOCK) => { [u8 ; 8] } ; (nalgebra , BC2_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , BC2_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , BC3_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , BC3_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , BC4_UNORM_BLOCK) => { [u8 ; 8] } ; (nalgebra , BC4_SNORM_BLOCK) => { [u8 ; 8] } ; (nalgebra , BC5_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , BC5_SNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , BC6H_UFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , BC6H_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , BC7_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , BC7_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ETC2_R8G8B8_UNORM_BLOCK) => { [u8 ; 8] } ; (nalgebra , ETC2_R8G8B8_SRGB_BLOCK) => { [u8 ; 8] } ; (nalgebra , ETC2_R8G8B8A1_UNORM_BLOCK) => { [u8 ; 8] } ; (nalgebra , ETC2_R8G8B8A1_SRGB_BLOCK) => { [u8 ; 8] } ; (nalgebra , ETC2_R8G8B8A8_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ETC2_R8G8B8A8_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , EAC_R11_UNORM_BLOCK) => { [u8 ; 8] } ; (nalgebra , EAC_R11_SNORM_BLOCK) => { [u8 ; 8] } ; (nalgebra , EAC_R11G11_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , EAC_R11G11_SNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_4x4_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_4x4_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_5x4_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_5x4_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_5x5_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_5x5_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_6x5_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_6x5_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_6x6_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_6x6_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_8x5_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_8x5_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_8x6_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_8x6_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_8x8_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_8x8_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_10x5_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_10x5_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_10x6_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_10x6_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_10x8_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_10x8_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_10x10_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_10x10_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_12x10_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_12x10_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_12x12_UNORM_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_12x12_SRGB_BLOCK) => { [u8 ; 16] } ; (nalgebra , G8B8G8R8_422_UNORM) => { nalgebra :: base :: SVector < u8 , 4usize > } ; (nalgebra , B8G8R8G8_422_UNORM) => { nalgebra :: base :: SVector < u8 , 4usize > } ; (nalgebra , R10X6_UNORM_PACK16) => { u16 } ; (nalgebra , R10X6G10X6_UNORM_2PACK16) => { [u16 ; 2] } ; (nalgebra , R10X6G10X6B10X6A10X6_UNORM_4PACK16) => { [u16 ; 4] } ; (nalgebra , G10X6B10X6G10X6R10X6_422_UNORM_4PACK16) => { [u16 ; 4] } ; (nalgebra , B10X6G10X6R10X6G10X6_422_UNORM_4PACK16) => { [u16 ; 4] } ; (nalgebra , R12X4_UNORM_PACK16) => { u16 } ; (nalgebra , R12X4G12X4_UNORM_2PACK16) => { [u16 ; 2] } ; (nalgebra , R12X4G12X4B12X4A12X4_UNORM_4PACK16) => { [u16 ; 4] } ; (nalgebra , G12X4B12X4G12X4R12X4_422_UNORM_4PACK16) => { [u16 ; 4] } ; (nalgebra , B12X4G12X4R12X4G12X4_422_UNORM_4PACK16) => { [u16 ; 4] } ; (nalgebra , G16B16G16R16_422_UNORM) => { nalgebra :: base :: SVector < u16 , 4usize > } ; (nalgebra , B16G16R16G16_422_UNORM) => { nalgebra :: base :: SVector < u16 , 4usize > } ; (nalgebra , PVRTC1_2BPP_UNORM_BLOCK) => { [u8 ; 8] } ; (nalgebra , PVRTC1_4BPP_UNORM_BLOCK) => { [u8 ; 8] } ; (nalgebra , PVRTC2_2BPP_UNORM_BLOCK) => { [u8 ; 8] } ; (nalgebra , PVRTC2_4BPP_UNORM_BLOCK) => { [u8 ; 8] } ; (nalgebra , PVRTC1_2BPP_SRGB_BLOCK) => { [u8 ; 8] } ; (nalgebra , PVRTC1_4BPP_SRGB_BLOCK) => { [u8 ; 8] } ; (nalgebra , PVRTC2_2BPP_SRGB_BLOCK) => { [u8 ; 8] } ; (nalgebra , PVRTC2_4BPP_SRGB_BLOCK) => { [u8 ; 8] } ; (nalgebra , ASTC_4x4_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_5x4_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_5x5_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_6x5_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_6x6_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_8x5_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_8x6_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_8x8_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_10x5_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_10x6_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_10x8_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_10x10_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_12x10_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , ASTC_12x12_SFLOAT_BLOCK) => { [u8 ; 16] } ; (nalgebra , A4R4G4B4_UNORM_PACK16) => { u16 } ; (nalgebra , A4B4G4R4_UNORM_PACK16) => { u16 } ; (nalgebra , R16G16_S10_5_NV) => { nalgebra :: base :: SVector < i16 , 2usize > } ; }