support for compressed formats in check_copy_buffer_image (#1229)

* support for compressed formats in check_copy_buffer_image

* fix trailing whitespace
This commit is contained in:
nickwilcox 2019-08-18 04:07:44 +10:00 committed by mitchmindtree
parent 0a8944362a
commit ea651e18d4
4 changed files with 206 additions and 191 deletions

View File

@ -2,6 +2,8 @@
- Update shaderc to 0.6. This again allows to use locally installed libraries which reduces the build-time significantly on Arch/Voidlinux (see https://github.com/google/shaderc-rs/issues/58)
- Removed faulty debug_assert in `SwapchainAcquireFuture::drop`.
- Compressed texture formats can now be uploaded using `ImmutableImage::from_iter`, `ImmutableImage::from_buffer`, `AutoCommandBuilder::copy_buffer_to_image_dimensions`,
and `AutoCommandBuilder::copy_buffer_to_image`.
# Version 0.13.0 (2019-07-02)

View File

@ -33,7 +33,6 @@ pub enum CheckCopyBufferImageTy {
///
/// - Panics if the buffer and image were not created with `device`.
///
// TODO: handle compressed image formats
pub fn check_copy_buffer_image<B, I, P>(device: &Device, buffer: &B, image: &I,
ty: CheckCopyBufferImageTy, image_offset: [u32; 3],
image_size: [u32; 3], image_first_layer: u32,
@ -98,8 +97,9 @@ pub fn check_copy_buffer_image<B, I, P>(device: &Device, buffer: &B, image: &I,
image.format().ensure_accepts()?;
{
let num_texels = image_size[0] * image_size[1] * image_size[2] * image_num_layers;
let required_len = num_texels as usize * image.format().rate() as usize;
let (block_width, block_height) = image.format().block_dimensions();
let num_blocks = (image_size[0] + block_width - 1) / block_width * (image_size[1] + block_height - 1) / block_height * image_size[2] * image_num_layers;
let required_len = num_blocks as usize * image.format().rate() as usize;
if required_len > buffer.len() {
return Err(CheckCopyBufferImageError::BufferTooSmall {
required_len: required_len,

View File

@ -174,7 +174,7 @@ pub unsafe trait AcceptsPixels<T> {
}
macro_rules! formats {
($($name:ident => $vk:ident [$sz:expr] [$($f_ty:tt)*] {$($d_ty:tt)*},)+) => (
($($name:ident => $vk:ident [$bdim:expr] [$sz:expr] [$($f_ty:tt)*] {$($d_ty:tt)*},)+) => (
/// An enumeration of all the possible formats.
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
#[repr(u32)]
@ -192,8 +192,9 @@ macro_rules! formats {
.. other functions ..
*/
/// Returns the size in bytes of an element of this format. Returns `None` if the
/// size is irrelevant (for example for compressed formats).
/// Returns the size in bytes of an element of this format. For block based formats
/// this will be the size of a single block. Returns `None` if the
/// size is irrelevant.
#[inline]
pub fn size(&self) -> Option<usize> {
match *self {
@ -203,6 +204,17 @@ macro_rules! formats {
}
}
/// Returns (width, heigh) of the dimensions for block based formats. For
/// non block formats will return (1,1)
#[inline]
pub fn block_dimensions(&self) -> (u32, u32) {
match *self {
$(
Format::$name => $bdim,
)+
}
}
/// Returns the `Format` corresponding to a Vulkan constant.
pub(crate) fn from_vulkan_num(val: u32) -> Option<Format> {
match val {
@ -420,190 +432,190 @@ macro_rules! formats {
}
formats! {
R4G4UnormPack8 => FORMAT_R4G4_UNORM_PACK8 [Some(1)] [float=2] {u8},
R4G4B4A4UnormPack16 => FORMAT_R4G4B4A4_UNORM_PACK16 [Some(2)] [float=4] {u16},
B4G4R4A4UnormPack16 => FORMAT_B4G4R4A4_UNORM_PACK16 [Some(2)] [float=4] {u16},
R5G6B5UnormPack16 => FORMAT_R5G6B5_UNORM_PACK16 [Some(2)] [float=3] {u16},
B5G6R5UnormPack16 => FORMAT_B5G6R5_UNORM_PACK16 [Some(2)] [float=3] {u16},
R5G5B5A1UnormPack16 => FORMAT_R5G5B5A1_UNORM_PACK16 [Some(2)] [float=4] {u16},
B5G5R5A1UnormPack16 => FORMAT_B5G5R5A1_UNORM_PACK16 [Some(2)] [float=4] {u16},
A1R5G5B5UnormPack16 => FORMAT_A1R5G5B5_UNORM_PACK16 [Some(2)] [float=4] {u16},
R8Unorm => FORMAT_R8_UNORM [Some(1)] [float=1] {u8},
R8Snorm => FORMAT_R8_SNORM [Some(1)] [float=1] {i8},
R8Uscaled => FORMAT_R8_USCALED [Some(1)] [float=1] {u8},
R8Sscaled => FORMAT_R8_SSCALED [Some(1)] [float=1] {i8},
R8Uint => FORMAT_R8_UINT [Some(1)] [uint=1] {u8},
R8Sint => FORMAT_R8_SINT [Some(1)] [sint=1] {i8},
R8Srgb => FORMAT_R8_SRGB [Some(1)] [float=1] {u8},
R8G8Unorm => FORMAT_R8G8_UNORM [Some(2)] [float=2] {[u8; 2]},
R8G8Snorm => FORMAT_R8G8_SNORM [Some(2)] [float=2] {[i8; 2]},
R8G8Uscaled => FORMAT_R8G8_USCALED [Some(2)] [float=2] {[u8; 2]},
R8G8Sscaled => FORMAT_R8G8_SSCALED [Some(2)] [float=2] {[i8; 2]},
R8G8Uint => FORMAT_R8G8_UINT [Some(2)] [uint=2] {[u8; 2]},
R8G8Sint => FORMAT_R8G8_SINT [Some(2)] [sint=2] {[i8; 2]},
R8G8Srgb => FORMAT_R8G8_SRGB [Some(2)] [float=2] {[u8; 2]},
R8G8B8Unorm => FORMAT_R8G8B8_UNORM [Some(3)] [float=3] {[u8; 3]},
R8G8B8Snorm => FORMAT_R8G8B8_SNORM [Some(3)] [float=3] {[i8; 3]},
R8G8B8Uscaled => FORMAT_R8G8B8_USCALED [Some(3)] [float=3] {[u8; 3]},
R8G8B8Sscaled => FORMAT_R8G8B8_SSCALED [Some(3)] [float=3] {[i8; 3]},
R8G8B8Uint => FORMAT_R8G8B8_UINT [Some(3)] [uint=3] {[u8; 3]},
R8G8B8Sint => FORMAT_R8G8B8_SINT [Some(3)] [sint=3] {[i8; 3]},
R8G8B8Srgb => FORMAT_R8G8B8_SRGB [Some(3)] [float=3] {[u8; 3]},
B8G8R8Unorm => FORMAT_B8G8R8_UNORM [Some(3)] [float=3] {[u8; 3]},
B8G8R8Snorm => FORMAT_B8G8R8_SNORM [Some(3)] [float=3] {[i8; 3]},
B8G8R8Uscaled => FORMAT_B8G8R8_USCALED [Some(3)] [float=3] {[u8; 3]},
B8G8R8Sscaled => FORMAT_B8G8R8_SSCALED [Some(3)] [float=3] {[i8; 3]},
B8G8R8Uint => FORMAT_B8G8R8_UINT [Some(3)] [uint=3] {[u8; 3]},
B8G8R8Sint => FORMAT_B8G8R8_SINT [Some(3)] [sint=3] {[i8; 3]},
B8G8R8Srgb => FORMAT_B8G8R8_SRGB [Some(3)] [float=3] {[u8; 3]},
R8G8B8A8Unorm => FORMAT_R8G8B8A8_UNORM [Some(4)] [float=4] {[u8; 4]},
R8G8B8A8Snorm => FORMAT_R8G8B8A8_SNORM [Some(4)] [float=4] {[i8; 4]},
R8G8B8A8Uscaled => FORMAT_R8G8B8A8_USCALED [Some(4)] [float=4] {[u8; 4]},
R8G8B8A8Sscaled => FORMAT_R8G8B8A8_SSCALED [Some(4)] [float=4] {[i8; 4]},
R8G8B8A8Uint => FORMAT_R8G8B8A8_UINT [Some(4)] [uint=4] {[u8; 4]},
R8G8B8A8Sint => FORMAT_R8G8B8A8_SINT [Some(4)] [sint=4] {[i8; 4]},
R8G8B8A8Srgb => FORMAT_R8G8B8A8_SRGB [Some(4)] [float=4] {[u8; 4]},
B8G8R8A8Unorm => FORMAT_B8G8R8A8_UNORM [Some(4)] [float=4] {[u8; 4]},
B8G8R8A8Snorm => FORMAT_B8G8R8A8_SNORM [Some(4)] [float=4] {[i8; 4]},
B8G8R8A8Uscaled => FORMAT_B8G8R8A8_USCALED [Some(4)] [float=4] {[u8; 4]},
B8G8R8A8Sscaled => FORMAT_B8G8R8A8_SSCALED [Some(4)] [float=4] {[i8; 4]},
B8G8R8A8Uint => FORMAT_B8G8R8A8_UINT [Some(4)] [uint=4] {[u8; 4]},
B8G8R8A8Sint => FORMAT_B8G8R8A8_SINT [Some(4)] [sint=4] {[i8; 4]},
B8G8R8A8Srgb => FORMAT_B8G8R8A8_SRGB [Some(4)] [float=4] {[u8; 4]},
A8B8G8R8UnormPack32 => FORMAT_A8B8G8R8_UNORM_PACK32 [Some(4)] [float=4] {[u8; 4]},
A8B8G8R8SnormPack32 => FORMAT_A8B8G8R8_SNORM_PACK32 [Some(4)] [float=4] {[i8; 4]},
A8B8G8R8UscaledPack32 => FORMAT_A8B8G8R8_USCALED_PACK32 [Some(4)] [float=4] {[u8; 4]},
A8B8G8R8SscaledPack32 => FORMAT_A8B8G8R8_SSCALED_PACK32 [Some(4)] [float=4] {[i8; 4]},
A8B8G8R8UintPack32 => FORMAT_A8B8G8R8_UINT_PACK32 [Some(4)] [uint=4] {[u8; 4]},
A8B8G8R8SintPack32 => FORMAT_A8B8G8R8_SINT_PACK32 [Some(4)] [sint=4] {[i8; 4]},
A8B8G8R8SrgbPack32 => FORMAT_A8B8G8R8_SRGB_PACK32 [Some(4)] [float=4] {[u8; 4]},
A2R10G10B10UnormPack32 => FORMAT_A2R10G10B10_UNORM_PACK32 [Some(4)] [float=4] {u32},
A2R10G10B10SnormPack32 => FORMAT_A2R10G10B10_SNORM_PACK32 [Some(4)] [float=4] {u32},
A2R10G10B10UscaledPack32 => FORMAT_A2R10G10B10_USCALED_PACK32 [Some(4)] [float=4] {u32},
A2R10G10B10SscaledPack32 => FORMAT_A2R10G10B10_SSCALED_PACK32 [Some(4)] [float=4] {u32},
A2R10G10B10UintPack32 => FORMAT_A2R10G10B10_UINT_PACK32 [Some(4)] [uint=4] {u32},
A2R10G10B10SintPack32 => FORMAT_A2R10G10B10_SINT_PACK32 [Some(4)] [sint=4] {u32},
A2B10G10R10UnormPack32 => FORMAT_A2B10G10R10_UNORM_PACK32 [Some(4)] [float=4] {u32},
A2B10G10R10SnormPack32 => FORMAT_A2B10G10R10_SNORM_PACK32 [Some(4)] [float=4] {u32},
A2B10G10R10UscaledPack32 => FORMAT_A2B10G10R10_USCALED_PACK32 [Some(4)] [float=4] {u32},
A2B10G10R10SscaledPack32 => FORMAT_A2B10G10R10_SSCALED_PACK32 [Some(4)] [float=4] {u32},
A2B10G10R10UintPack32 => FORMAT_A2B10G10R10_UINT_PACK32 [Some(4)] [uint=4] {u32},
A2B10G10R10SintPack32 => FORMAT_A2B10G10R10_SINT_PACK32 [Some(4)] [sint=4] {u32},
R16Unorm => FORMAT_R16_UNORM [Some(2)] [float=1] {u16},
R16Snorm => FORMAT_R16_SNORM [Some(2)] [float=1] {i16},
R16Uscaled => FORMAT_R16_USCALED [Some(2)] [float=1] {u16},
R16Sscaled => FORMAT_R16_SSCALED [Some(2)] [float=1] {i16},
R16Uint => FORMAT_R16_UINT [Some(2)] [uint=1] {u16},
R16Sint => FORMAT_R16_SINT [Some(2)] [sint=1] {i16},
R16Sfloat => FORMAT_R16_SFLOAT [Some(2)] [float=1] {f16},
R16G16Unorm => FORMAT_R16G16_UNORM [Some(4)] [float=2] {[u16; 2]},
R16G16Snorm => FORMAT_R16G16_SNORM [Some(4)] [float=2] {[i16; 2]},
R16G16Uscaled => FORMAT_R16G16_USCALED [Some(4)] [float=2] {[u16; 2]},
R16G16Sscaled => FORMAT_R16G16_SSCALED [Some(4)] [float=2] {[i16; 2]},
R16G16Uint => FORMAT_R16G16_UINT [Some(4)] [uint=2] {[u16; 2]},
R16G16Sint => FORMAT_R16G16_SINT [Some(4)] [sint=2] {[i16; 2]},
R16G16Sfloat => FORMAT_R16G16_SFLOAT [Some(4)] [float=2] {[f16; 2]},
R16G16B16Unorm => FORMAT_R16G16B16_UNORM [Some(6)] [float=3] {[u16; 3]},
R16G16B16Snorm => FORMAT_R16G16B16_SNORM [Some(6)] [float=3] {[i16; 3]},
R16G16B16Uscaled => FORMAT_R16G16B16_USCALED [Some(6)] [float=3] {[u16; 3]},
R16G16B16Sscaled => FORMAT_R16G16B16_SSCALED [Some(6)] [float=3] {[i16; 3]},
R16G16B16Uint => FORMAT_R16G16B16_UINT [Some(6)] [uint=3] {[u16; 3]},
R16G16B16Sint => FORMAT_R16G16B16_SINT [Some(6)] [sint=3] {[i16; 3]},
R16G16B16Sfloat => FORMAT_R16G16B16_SFLOAT [Some(6)] [float=3] {[f16; 3]},
R16G16B16A16Unorm => FORMAT_R16G16B16A16_UNORM [Some(8)] [float=4] {[u16; 4]},
R16G16B16A16Snorm => FORMAT_R16G16B16A16_SNORM [Some(8)] [float=4] {[i16; 4]},
R16G16B16A16Uscaled => FORMAT_R16G16B16A16_USCALED [Some(8)] [float=4] {[u16; 4]},
R16G16B16A16Sscaled => FORMAT_R16G16B16A16_SSCALED [Some(8)] [float=4] {[i16; 4]},
R16G16B16A16Uint => FORMAT_R16G16B16A16_UINT [Some(8)] [uint=4] {[u16; 4]},
R16G16B16A16Sint => FORMAT_R16G16B16A16_SINT [Some(8)] [sint=4] {[i16; 4]},
R16G16B16A16Sfloat => FORMAT_R16G16B16A16_SFLOAT [Some(8)] [float=4] {[f16; 4]},
R32Uint => FORMAT_R32_UINT [Some(4)] [uint=1] {u32},
R32Sint => FORMAT_R32_SINT [Some(4)] [sint=1] {i32},
R32Sfloat => FORMAT_R32_SFLOAT [Some(4)] [float=1] {f32},
R32G32Uint => FORMAT_R32G32_UINT [Some(8)] [uint=2] {[u32; 2]},
R32G32Sint => FORMAT_R32G32_SINT [Some(8)] [sint=2] {[i32; 2]},
R32G32Sfloat => FORMAT_R32G32_SFLOAT [Some(8)] [float=2] {[f32; 2]},
R32G32B32Uint => FORMAT_R32G32B32_UINT [Some(12)] [uint=3] {[u32; 3]},
R32G32B32Sint => FORMAT_R32G32B32_SINT [Some(12)] [sint=3] {[i32; 3]},
R32G32B32Sfloat => FORMAT_R32G32B32_SFLOAT [Some(12)] [float=3] {[f32; 3]},
R32G32B32A32Uint => FORMAT_R32G32B32A32_UINT [Some(16)] [uint=4] {[u32; 4]},
R32G32B32A32Sint => FORMAT_R32G32B32A32_SINT [Some(16)] [sint=4] {[i32; 4]},
R32G32B32A32Sfloat => FORMAT_R32G32B32A32_SFLOAT [Some(16)] [float=4] {[f32; 4]},
R64Uint => FORMAT_R64_UINT [Some(8)] [uint=1] {u64},
R64Sint => FORMAT_R64_SINT [Some(8)] [sint=1] {i64},
R64Sfloat => FORMAT_R64_SFLOAT [Some(8)] [float=1] {f64},
R64G64Uint => FORMAT_R64G64_UINT [Some(16)] [uint=2] {[u64; 2]},
R64G64Sint => FORMAT_R64G64_SINT [Some(16)] [sint=2] {[i64; 2]},
R64G64Sfloat => FORMAT_R64G64_SFLOAT [Some(16)] [float=2] {[f64; 2]},
R64G64B64Uint => FORMAT_R64G64B64_UINT [Some(24)] [uint=3] {[u64; 3]},
R64G64B64Sint => FORMAT_R64G64B64_SINT [Some(24)] [sint=3] {[i64; 3]},
R64G64B64Sfloat => FORMAT_R64G64B64_SFLOAT [Some(24)] [float=3] {[f64; 3]},
R64G64B64A64Uint => FORMAT_R64G64B64A64_UINT [Some(32)] [uint=4] {[u64; 4]},
R64G64B64A64Sint => FORMAT_R64G64B64A64_SINT [Some(32)] [sint=4] {[i64; 4]},
R64G64B64A64Sfloat => FORMAT_R64G64B64A64_SFLOAT [Some(32)] [float=4] {[f64; 4]},
B10G11R11UfloatPack32 => FORMAT_B10G11R11_UFLOAT_PACK32 [Some(4)] [float=3] {u32},
E5B9G9R9UfloatPack32 => FORMAT_E5B9G9R9_UFLOAT_PACK32 [Some(4)] [float=3] {u32},
D16Unorm => FORMAT_D16_UNORM [Some(2)] [depth] {},
X8_D24UnormPack32 => FORMAT_X8_D24_UNORM_PACK32 [Some(4)] [depth] {},
D32Sfloat => FORMAT_D32_SFLOAT [Some(4)] [depth] {},
S8Uint => FORMAT_S8_UINT [Some(1)] [stencil] {},
D16Unorm_S8Uint => FORMAT_D16_UNORM_S8_UINT [None] [depthstencil] {},
D24Unorm_S8Uint => FORMAT_D24_UNORM_S8_UINT [None] [depthstencil] {},
D32Sfloat_S8Uint => FORMAT_D32_SFLOAT_S8_UINT [None] [depthstencil] {},
BC1_RGBUnormBlock => FORMAT_BC1_RGB_UNORM_BLOCK [None] [compressed=texture_compression_bc] {},
BC1_RGBSrgbBlock => FORMAT_BC1_RGB_SRGB_BLOCK [None] [compressed=texture_compression_bc] {},
BC1_RGBAUnormBlock => FORMAT_BC1_RGBA_UNORM_BLOCK [None] [compressed=texture_compression_bc] {},
BC1_RGBASrgbBlock => FORMAT_BC1_RGBA_SRGB_BLOCK [None] [compressed=texture_compression_bc] {},
BC2UnormBlock => FORMAT_BC2_UNORM_BLOCK [None] [compressed=texture_compression_bc] {},
BC2SrgbBlock => FORMAT_BC2_SRGB_BLOCK [None] [compressed=texture_compression_bc] {},
BC3UnormBlock => FORMAT_BC3_UNORM_BLOCK [None] [compressed=texture_compression_bc] {},
BC3SrgbBlock => FORMAT_BC3_SRGB_BLOCK [None] [compressed=texture_compression_bc] {},
BC4UnormBlock => FORMAT_BC4_UNORM_BLOCK [None] [compressed=texture_compression_bc] {},
BC4SnormBlock => FORMAT_BC4_SNORM_BLOCK [None] [compressed=texture_compression_bc] {},
BC5UnormBlock => FORMAT_BC5_UNORM_BLOCK [None] [compressed=texture_compression_bc] {},
BC5SnormBlock => FORMAT_BC5_SNORM_BLOCK [None] [compressed=texture_compression_bc] {},
BC6HUfloatBlock => FORMAT_BC6H_UFLOAT_BLOCK [None] [compressed=texture_compression_bc] {},
BC6HSfloatBlock => FORMAT_BC6H_SFLOAT_BLOCK [None] [compressed=texture_compression_bc] {},
BC7UnormBlock => FORMAT_BC7_UNORM_BLOCK [None] [compressed=texture_compression_bc] {},
BC7SrgbBlock => FORMAT_BC7_SRGB_BLOCK [None] [compressed=texture_compression_bc] {},
ETC2_R8G8B8UnormBlock => FORMAT_ETC2_R8G8B8_UNORM_BLOCK [None] [compressed=texture_compression_etc2] {},
ETC2_R8G8B8SrgbBlock => FORMAT_ETC2_R8G8B8_SRGB_BLOCK [None] [compressed=texture_compression_etc2] {},
ETC2_R8G8B8A1UnormBlock => FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK [None] [compressed=texture_compression_etc2] {},
ETC2_R8G8B8A1SrgbBlock => FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK [None] [compressed=texture_compression_etc2] {},
ETC2_R8G8B8A8UnormBlock => FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK [None] [compressed=texture_compression_etc2] {},
ETC2_R8G8B8A8SrgbBlock => FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK [None] [compressed=texture_compression_etc2] {},
EAC_R11UnormBlock => FORMAT_EAC_R11_UNORM_BLOCK [None] [compressed=texture_compression_etc2] {},
EAC_R11SnormBlock => FORMAT_EAC_R11_SNORM_BLOCK [None] [compressed=texture_compression_etc2] {},
EAC_R11G11UnormBlock => FORMAT_EAC_R11G11_UNORM_BLOCK [None] [compressed=texture_compression_etc2] {},
EAC_R11G11SnormBlock => FORMAT_EAC_R11G11_SNORM_BLOCK [None] [compressed=texture_compression_etc2] {},
ASTC_4x4UnormBlock => FORMAT_ASTC_4x4_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_4x4SrgbBlock => FORMAT_ASTC_4x4_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_5x4UnormBlock => FORMAT_ASTC_5x4_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_5x4SrgbBlock => FORMAT_ASTC_5x4_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_5x5UnormBlock => FORMAT_ASTC_5x5_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_5x5SrgbBlock => FORMAT_ASTC_5x5_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_6x5UnormBlock => FORMAT_ASTC_6x5_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_6x5SrgbBlock => FORMAT_ASTC_6x5_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_6x6UnormBlock => FORMAT_ASTC_6x6_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_6x6SrgbBlock => FORMAT_ASTC_6x6_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_8x5UnormBlock => FORMAT_ASTC_8x5_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_8x5SrgbBlock => FORMAT_ASTC_8x5_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_8x6UnormBlock => FORMAT_ASTC_8x6_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_8x6SrgbBlock => FORMAT_ASTC_8x6_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_8x8UnormBlock => FORMAT_ASTC_8x8_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_8x8SrgbBlock => FORMAT_ASTC_8x8_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_10x5UnormBlock => FORMAT_ASTC_10x5_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_10x5SrgbBlock => FORMAT_ASTC_10x5_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_10x6UnormBlock => FORMAT_ASTC_10x6_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_10x6SrgbBlock => FORMAT_ASTC_10x6_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_10x8UnormBlock => FORMAT_ASTC_10x8_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_10x8SrgbBlock => FORMAT_ASTC_10x8_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_10x10UnormBlock => FORMAT_ASTC_10x10_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_10x10SrgbBlock => FORMAT_ASTC_10x10_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_12x10UnormBlock => FORMAT_ASTC_12x10_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_12x10SrgbBlock => FORMAT_ASTC_12x10_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_12x12UnormBlock => FORMAT_ASTC_12x12_UNORM_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
ASTC_12x12SrgbBlock => FORMAT_ASTC_12x12_SRGB_BLOCK [None] [compressed=texture_compression_astc_ldr] {},
R4G4UnormPack8 => FORMAT_R4G4_UNORM_PACK8 [(1, 1)] [Some(1)] [float=2] {u8},
R4G4B4A4UnormPack16 => FORMAT_R4G4B4A4_UNORM_PACK16 [(1, 1)] [Some(2)] [float=4] {u16},
B4G4R4A4UnormPack16 => FORMAT_B4G4R4A4_UNORM_PACK16 [(1, 1)] [Some(2)] [float=4] {u16},
R5G6B5UnormPack16 => FORMAT_R5G6B5_UNORM_PACK16 [(1, 1)] [Some(2)] [float=3] {u16},
B5G6R5UnormPack16 => FORMAT_B5G6R5_UNORM_PACK16 [(1, 1)] [Some(2)] [float=3] {u16},
R5G5B5A1UnormPack16 => FORMAT_R5G5B5A1_UNORM_PACK16 [(1, 1)] [Some(2)] [float=4] {u16},
B5G5R5A1UnormPack16 => FORMAT_B5G5R5A1_UNORM_PACK16 [(1, 1)] [Some(2)] [float=4] {u16},
A1R5G5B5UnormPack16 => FORMAT_A1R5G5B5_UNORM_PACK16 [(1, 1)] [Some(2)] [float=4] {u16},
R8Unorm => FORMAT_R8_UNORM [(1, 1)] [Some(1)] [float=1] {u8},
R8Snorm => FORMAT_R8_SNORM [(1, 1)] [Some(1)] [float=1] {i8},
R8Uscaled => FORMAT_R8_USCALED [(1, 1)] [Some(1)] [float=1] {u8},
R8Sscaled => FORMAT_R8_SSCALED [(1, 1)] [Some(1)] [float=1] {i8},
R8Uint => FORMAT_R8_UINT [(1, 1)] [Some(1)] [uint=1] {u8},
R8Sint => FORMAT_R8_SINT [(1, 1)] [Some(1)] [sint=1] {i8},
R8Srgb => FORMAT_R8_SRGB [(1, 1)] [Some(1)] [float=1] {u8},
R8G8Unorm => FORMAT_R8G8_UNORM [(1, 1)] [Some(2)] [float=2] {[u8; 2]},
R8G8Snorm => FORMAT_R8G8_SNORM [(1, 1)] [Some(2)] [float=2] {[i8; 2]},
R8G8Uscaled => FORMAT_R8G8_USCALED [(1, 1)] [Some(2)] [float=2] {[u8; 2]},
R8G8Sscaled => FORMAT_R8G8_SSCALED [(1, 1)] [Some(2)] [float=2] {[i8; 2]},
R8G8Uint => FORMAT_R8G8_UINT [(1, 1)] [Some(2)] [uint=2] {[u8; 2]},
R8G8Sint => FORMAT_R8G8_SINT [(1, 1)] [Some(2)] [sint=2] {[i8; 2]},
R8G8Srgb => FORMAT_R8G8_SRGB [(1, 1)] [Some(2)] [float=2] {[u8; 2]},
R8G8B8Unorm => FORMAT_R8G8B8_UNORM [(1, 1)] [Some(3)] [float=3] {[u8; 3]},
R8G8B8Snorm => FORMAT_R8G8B8_SNORM [(1, 1)] [Some(3)] [float=3] {[i8; 3]},
R8G8B8Uscaled => FORMAT_R8G8B8_USCALED [(1, 1)] [Some(3)] [float=3] {[u8; 3]},
R8G8B8Sscaled => FORMAT_R8G8B8_SSCALED [(1, 1)] [Some(3)] [float=3] {[i8; 3]},
R8G8B8Uint => FORMAT_R8G8B8_UINT [(1, 1)] [Some(3)] [uint=3] {[u8; 3]},
R8G8B8Sint => FORMAT_R8G8B8_SINT [(1, 1)] [Some(3)] [sint=3] {[i8; 3]},
R8G8B8Srgb => FORMAT_R8G8B8_SRGB [(1, 1)] [Some(3)] [float=3] {[u8; 3]},
B8G8R8Unorm => FORMAT_B8G8R8_UNORM [(1, 1)] [Some(3)] [float=3] {[u8; 3]},
B8G8R8Snorm => FORMAT_B8G8R8_SNORM [(1, 1)] [Some(3)] [float=3] {[i8; 3]},
B8G8R8Uscaled => FORMAT_B8G8R8_USCALED [(1, 1)] [Some(3)] [float=3] {[u8; 3]},
B8G8R8Sscaled => FORMAT_B8G8R8_SSCALED [(1, 1)] [Some(3)] [float=3] {[i8; 3]},
B8G8R8Uint => FORMAT_B8G8R8_UINT [(1, 1)] [Some(3)] [uint=3] {[u8; 3]},
B8G8R8Sint => FORMAT_B8G8R8_SINT [(1, 1)] [Some(3)] [sint=3] {[i8; 3]},
B8G8R8Srgb => FORMAT_B8G8R8_SRGB [(1, 1)] [Some(3)] [float=3] {[u8; 3]},
R8G8B8A8Unorm => FORMAT_R8G8B8A8_UNORM [(1, 1)] [Some(4)] [float=4] {[u8; 4]},
R8G8B8A8Snorm => FORMAT_R8G8B8A8_SNORM [(1, 1)] [Some(4)] [float=4] {[i8; 4]},
R8G8B8A8Uscaled => FORMAT_R8G8B8A8_USCALED [(1, 1)] [Some(4)] [float=4] {[u8; 4]},
R8G8B8A8Sscaled => FORMAT_R8G8B8A8_SSCALED [(1, 1)] [Some(4)] [float=4] {[i8; 4]},
R8G8B8A8Uint => FORMAT_R8G8B8A8_UINT [(1, 1)] [Some(4)] [uint=4] {[u8; 4]},
R8G8B8A8Sint => FORMAT_R8G8B8A8_SINT [(1, 1)] [Some(4)] [sint=4] {[i8; 4]},
R8G8B8A8Srgb => FORMAT_R8G8B8A8_SRGB [(1, 1)] [Some(4)] [float=4] {[u8; 4]},
B8G8R8A8Unorm => FORMAT_B8G8R8A8_UNORM [(1, 1)] [Some(4)] [float=4] {[u8; 4]},
B8G8R8A8Snorm => FORMAT_B8G8R8A8_SNORM [(1, 1)] [Some(4)] [float=4] {[i8; 4]},
B8G8R8A8Uscaled => FORMAT_B8G8R8A8_USCALED [(1, 1)] [Some(4)] [float=4] {[u8; 4]},
B8G8R8A8Sscaled => FORMAT_B8G8R8A8_SSCALED [(1, 1)] [Some(4)] [float=4] {[i8; 4]},
B8G8R8A8Uint => FORMAT_B8G8R8A8_UINT [(1, 1)] [Some(4)] [uint=4] {[u8; 4]},
B8G8R8A8Sint => FORMAT_B8G8R8A8_SINT [(1, 1)] [Some(4)] [sint=4] {[i8; 4]},
B8G8R8A8Srgb => FORMAT_B8G8R8A8_SRGB [(1, 1)] [Some(4)] [float=4] {[u8; 4]},
A8B8G8R8UnormPack32 => FORMAT_A8B8G8R8_UNORM_PACK32 [(1, 1)] [Some(4)] [float=4] {[u8; 4]},
A8B8G8R8SnormPack32 => FORMAT_A8B8G8R8_SNORM_PACK32 [(1, 1)] [Some(4)] [float=4] {[i8; 4]},
A8B8G8R8UscaledPack32 => FORMAT_A8B8G8R8_USCALED_PACK32 [(1, 1)] [Some(4)] [float=4] {[u8; 4]},
A8B8G8R8SscaledPack32 => FORMAT_A8B8G8R8_SSCALED_PACK32 [(1, 1)] [Some(4)] [float=4] {[i8; 4]},
A8B8G8R8UintPack32 => FORMAT_A8B8G8R8_UINT_PACK32 [(1, 1)] [Some(4)] [uint=4] {[u8; 4]},
A8B8G8R8SintPack32 => FORMAT_A8B8G8R8_SINT_PACK32 [(1, 1)] [Some(4)] [sint=4] {[i8; 4]},
A8B8G8R8SrgbPack32 => FORMAT_A8B8G8R8_SRGB_PACK32 [(1, 1)] [Some(4)] [float=4] {[u8; 4]},
A2R10G10B10UnormPack32 => FORMAT_A2R10G10B10_UNORM_PACK32 [(1, 1)] [Some(4)] [float=4] {u32},
A2R10G10B10SnormPack32 => FORMAT_A2R10G10B10_SNORM_PACK32 [(1, 1)] [Some(4)] [float=4] {u32},
A2R10G10B10UscaledPack32 => FORMAT_A2R10G10B10_USCALED_PACK32 [(1, 1)] [Some(4)] [float=4] {u32},
A2R10G10B10SscaledPack32 => FORMAT_A2R10G10B10_SSCALED_PACK32 [(1, 1)] [Some(4)] [float=4] {u32},
A2R10G10B10UintPack32 => FORMAT_A2R10G10B10_UINT_PACK32 [(1, 1)] [Some(4)] [uint=4] {u32},
A2R10G10B10SintPack32 => FORMAT_A2R10G10B10_SINT_PACK32 [(1, 1)] [Some(4)] [sint=4] {u32},
A2B10G10R10UnormPack32 => FORMAT_A2B10G10R10_UNORM_PACK32 [(1, 1)] [Some(4)] [float=4] {u32},
A2B10G10R10SnormPack32 => FORMAT_A2B10G10R10_SNORM_PACK32 [(1, 1)] [Some(4)] [float=4] {u32},
A2B10G10R10UscaledPack32 => FORMAT_A2B10G10R10_USCALED_PACK32 [(1, 1)] [Some(4)] [float=4] {u32},
A2B10G10R10SscaledPack32 => FORMAT_A2B10G10R10_SSCALED_PACK32 [(1, 1)] [Some(4)] [float=4] {u32},
A2B10G10R10UintPack32 => FORMAT_A2B10G10R10_UINT_PACK32 [(1, 1)] [Some(4)] [uint=4] {u32},
A2B10G10R10SintPack32 => FORMAT_A2B10G10R10_SINT_PACK32 [(1, 1)] [Some(4)] [sint=4] {u32},
R16Unorm => FORMAT_R16_UNORM [(1, 1)] [Some(2)] [float=1] {u16},
R16Snorm => FORMAT_R16_SNORM [(1, 1)] [Some(2)] [float=1] {i16},
R16Uscaled => FORMAT_R16_USCALED [(1, 1)] [Some(2)] [float=1] {u16},
R16Sscaled => FORMAT_R16_SSCALED [(1, 1)] [Some(2)] [float=1] {i16},
R16Uint => FORMAT_R16_UINT [(1, 1)] [Some(2)] [uint=1] {u16},
R16Sint => FORMAT_R16_SINT [(1, 1)] [Some(2)] [sint=1] {i16},
R16Sfloat => FORMAT_R16_SFLOAT [(1, 1)] [Some(2)] [float=1] {f16},
R16G16Unorm => FORMAT_R16G16_UNORM [(1, 1)] [Some(4)] [float=2] {[u16; 2]},
R16G16Snorm => FORMAT_R16G16_SNORM [(1, 1)] [Some(4)] [float=2] {[i16; 2]},
R16G16Uscaled => FORMAT_R16G16_USCALED [(1, 1)] [Some(4)] [float=2] {[u16; 2]},
R16G16Sscaled => FORMAT_R16G16_SSCALED [(1, 1)] [Some(4)] [float=2] {[i16; 2]},
R16G16Uint => FORMAT_R16G16_UINT [(1, 1)] [Some(4)] [uint=2] {[u16; 2]},
R16G16Sint => FORMAT_R16G16_SINT [(1, 1)] [Some(4)] [sint=2] {[i16; 2]},
R16G16Sfloat => FORMAT_R16G16_SFLOAT [(1, 1)] [Some(4)] [float=2] {[f16; 2]},
R16G16B16Unorm => FORMAT_R16G16B16_UNORM [(1, 1)] [Some(6)] [float=3] {[u16; 3]},
R16G16B16Snorm => FORMAT_R16G16B16_SNORM [(1, 1)] [Some(6)] [float=3] {[i16; 3]},
R16G16B16Uscaled => FORMAT_R16G16B16_USCALED [(1, 1)] [Some(6)] [float=3] {[u16; 3]},
R16G16B16Sscaled => FORMAT_R16G16B16_SSCALED [(1, 1)] [Some(6)] [float=3] {[i16; 3]},
R16G16B16Uint => FORMAT_R16G16B16_UINT [(1, 1)] [Some(6)] [uint=3] {[u16; 3]},
R16G16B16Sint => FORMAT_R16G16B16_SINT [(1, 1)] [Some(6)] [sint=3] {[i16; 3]},
R16G16B16Sfloat => FORMAT_R16G16B16_SFLOAT [(1, 1)] [Some(6)] [float=3] {[f16; 3]},
R16G16B16A16Unorm => FORMAT_R16G16B16A16_UNORM [(1, 1)] [Some(8)] [float=4] {[u16; 4]},
R16G16B16A16Snorm => FORMAT_R16G16B16A16_SNORM [(1, 1)] [Some(8)] [float=4] {[i16; 4]},
R16G16B16A16Uscaled => FORMAT_R16G16B16A16_USCALED [(1, 1)] [Some(8)] [float=4] {[u16; 4]},
R16G16B16A16Sscaled => FORMAT_R16G16B16A16_SSCALED [(1, 1)] [Some(8)] [float=4] {[i16; 4]},
R16G16B16A16Uint => FORMAT_R16G16B16A16_UINT [(1, 1)] [Some(8)] [uint=4] {[u16; 4]},
R16G16B16A16Sint => FORMAT_R16G16B16A16_SINT [(1, 1)] [Some(8)] [sint=4] {[i16; 4]},
R16G16B16A16Sfloat => FORMAT_R16G16B16A16_SFLOAT [(1, 1)] [Some(8)] [float=4] {[f16; 4]},
R32Uint => FORMAT_R32_UINT [(1, 1)] [Some(4)] [uint=1] {u32},
R32Sint => FORMAT_R32_SINT [(1, 1)] [Some(4)] [sint=1] {i32},
R32Sfloat => FORMAT_R32_SFLOAT [(1, 1)] [Some(4)] [float=1] {f32},
R32G32Uint => FORMAT_R32G32_UINT [(1, 1)] [Some(8)] [uint=2] {[u32; 2]},
R32G32Sint => FORMAT_R32G32_SINT [(1, 1)] [Some(8)] [sint=2] {[i32; 2]},
R32G32Sfloat => FORMAT_R32G32_SFLOAT [(1, 1)] [Some(8)] [float=2] {[f32; 2]},
R32G32B32Uint => FORMAT_R32G32B32_UINT [(1, 1)] [Some(12)] [uint=3] {[u32; 3]},
R32G32B32Sint => FORMAT_R32G32B32_SINT [(1, 1)] [Some(12)] [sint=3] {[i32; 3]},
R32G32B32Sfloat => FORMAT_R32G32B32_SFLOAT [(1, 1)] [Some(12)] [float=3] {[f32; 3]},
R32G32B32A32Uint => FORMAT_R32G32B32A32_UINT [(1, 1)] [Some(16)] [uint=4] {[u32; 4]},
R32G32B32A32Sint => FORMAT_R32G32B32A32_SINT [(1, 1)] [Some(16)] [sint=4] {[i32; 4]},
R32G32B32A32Sfloat => FORMAT_R32G32B32A32_SFLOAT [(1, 1)] [Some(16)] [float=4] {[f32; 4]},
R64Uint => FORMAT_R64_UINT [(1, 1)] [Some(8)] [uint=1] {u64},
R64Sint => FORMAT_R64_SINT [(1, 1)] [Some(8)] [sint=1] {i64},
R64Sfloat => FORMAT_R64_SFLOAT [(1, 1)] [Some(8)] [float=1] {f64},
R64G64Uint => FORMAT_R64G64_UINT [(1, 1)] [Some(16)] [uint=2] {[u64; 2]},
R64G64Sint => FORMAT_R64G64_SINT [(1, 1)] [Some(16)] [sint=2] {[i64; 2]},
R64G64Sfloat => FORMAT_R64G64_SFLOAT [(1, 1)] [Some(16)] [float=2] {[f64; 2]},
R64G64B64Uint => FORMAT_R64G64B64_UINT [(1, 1)] [Some(24)] [uint=3] {[u64; 3]},
R64G64B64Sint => FORMAT_R64G64B64_SINT [(1, 1)] [Some(24)] [sint=3] {[i64; 3]},
R64G64B64Sfloat => FORMAT_R64G64B64_SFLOAT [(1, 1)] [Some(24)] [float=3] {[f64; 3]},
R64G64B64A64Uint => FORMAT_R64G64B64A64_UINT [(1, 1)] [Some(32)] [uint=4] {[u64; 4]},
R64G64B64A64Sint => FORMAT_R64G64B64A64_SINT [(1, 1)] [Some(32)] [sint=4] {[i64; 4]},
R64G64B64A64Sfloat => FORMAT_R64G64B64A64_SFLOAT [(1, 1)] [Some(32)] [float=4] {[f64; 4]},
B10G11R11UfloatPack32 => FORMAT_B10G11R11_UFLOAT_PACK32 [(1, 1)] [Some(4)] [float=3] {u32},
E5B9G9R9UfloatPack32 => FORMAT_E5B9G9R9_UFLOAT_PACK32 [(1, 1)] [Some(4)] [float=3] {u32},
D16Unorm => FORMAT_D16_UNORM [(1, 1)] [Some(2)] [depth] {},
X8_D24UnormPack32 => FORMAT_X8_D24_UNORM_PACK32 [(1, 1)] [Some(4)] [depth] {},
D32Sfloat => FORMAT_D32_SFLOAT [(1, 1)] [Some(4)] [depth] {},
S8Uint => FORMAT_S8_UINT [(1, 1)] [Some(1)] [stencil] {},
D16Unorm_S8Uint => FORMAT_D16_UNORM_S8_UINT [(1, 1)] [None] [depthstencil] {},
D24Unorm_S8Uint => FORMAT_D24_UNORM_S8_UINT [(1, 1)] [None] [depthstencil] {},
D32Sfloat_S8Uint => FORMAT_D32_SFLOAT_S8_UINT [(1, 1)] [None] [depthstencil] {},
BC1_RGBUnormBlock => FORMAT_BC1_RGB_UNORM_BLOCK [(4, 4)] [Some(8)] [compressed=texture_compression_bc] {u8},
BC1_RGBSrgbBlock => FORMAT_BC1_RGB_SRGB_BLOCK [(4, 4)] [Some(8)] [compressed=texture_compression_bc] {u8},
BC1_RGBAUnormBlock => FORMAT_BC1_RGBA_UNORM_BLOCK [(4, 4)] [Some(8)] [compressed=texture_compression_bc] {u8},
BC1_RGBASrgbBlock => FORMAT_BC1_RGBA_SRGB_BLOCK [(4, 4)] [Some(8)] [compressed=texture_compression_bc] {u8},
BC2UnormBlock => FORMAT_BC2_UNORM_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_bc] {u8},
BC2SrgbBlock => FORMAT_BC2_SRGB_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_bc] {u8},
BC3UnormBlock => FORMAT_BC3_UNORM_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_bc] {u8},
BC3SrgbBlock => FORMAT_BC3_SRGB_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_bc] {u8},
BC4UnormBlock => FORMAT_BC4_UNORM_BLOCK [(4, 4)] [Some(8)] [compressed=texture_compression_bc] {u8},
BC4SnormBlock => FORMAT_BC4_SNORM_BLOCK [(4, 4)] [Some(8)] [compressed=texture_compression_bc] {u8},
BC5UnormBlock => FORMAT_BC5_UNORM_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_bc] {u8},
BC5SnormBlock => FORMAT_BC5_SNORM_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_bc] {u8},
BC6HUfloatBlock => FORMAT_BC6H_UFLOAT_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_bc] {u8},
BC6HSfloatBlock => FORMAT_BC6H_SFLOAT_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_bc] {u8},
BC7UnormBlock => FORMAT_BC7_UNORM_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_bc] {u8},
BC7SrgbBlock => FORMAT_BC7_SRGB_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_bc] {u8},
ETC2_R8G8B8UnormBlock => FORMAT_ETC2_R8G8B8_UNORM_BLOCK [(4, 4)] [Some(8)] [compressed=texture_compression_etc2] {u8},
ETC2_R8G8B8SrgbBlock => FORMAT_ETC2_R8G8B8_SRGB_BLOCK [(4, 4)] [Some(8)] [compressed=texture_compression_etc2] {u8},
ETC2_R8G8B8A1UnormBlock => FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK [(4, 4)] [Some(8)] [compressed=texture_compression_etc2] {u8},
ETC2_R8G8B8A1SrgbBlock => FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK [(4, 4)] [Some(8)] [compressed=texture_compression_etc2] {u8},
ETC2_R8G8B8A8UnormBlock => FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_etc2] {u8},
ETC2_R8G8B8A8SrgbBlock => FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_etc2] {u8},
EAC_R11UnormBlock => FORMAT_EAC_R11_UNORM_BLOCK [(4, 4)] [Some(8)] [compressed=texture_compression_etc2] {u8},
EAC_R11SnormBlock => FORMAT_EAC_R11_SNORM_BLOCK [(4, 4)] [Some(8)] [compressed=texture_compression_etc2] {u8},
EAC_R11G11UnormBlock => FORMAT_EAC_R11G11_UNORM_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_etc2] {u8},
EAC_R11G11SnormBlock => FORMAT_EAC_R11G11_SNORM_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_etc2] {u8},
ASTC_4x4UnormBlock => FORMAT_ASTC_4x4_UNORM_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_4x4SrgbBlock => FORMAT_ASTC_4x4_SRGB_BLOCK [(4, 4)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_5x4UnormBlock => FORMAT_ASTC_5x4_UNORM_BLOCK [(5, 4)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_5x4SrgbBlock => FORMAT_ASTC_5x4_SRGB_BLOCK [(5, 4)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_5x5UnormBlock => FORMAT_ASTC_5x5_UNORM_BLOCK [(5, 5)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_5x5SrgbBlock => FORMAT_ASTC_5x5_SRGB_BLOCK [(5, 5)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_6x5UnormBlock => FORMAT_ASTC_6x5_UNORM_BLOCK [(6, 5)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_6x5SrgbBlock => FORMAT_ASTC_6x5_SRGB_BLOCK [(6, 5)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_6x6UnormBlock => FORMAT_ASTC_6x6_UNORM_BLOCK [(6, 6)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_6x6SrgbBlock => FORMAT_ASTC_6x6_SRGB_BLOCK [(6, 6)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_8x5UnormBlock => FORMAT_ASTC_8x5_UNORM_BLOCK [(8, 5)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_8x5SrgbBlock => FORMAT_ASTC_8x5_SRGB_BLOCK [(8, 5)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_8x6UnormBlock => FORMAT_ASTC_8x6_UNORM_BLOCK [(8, 6)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_8x6SrgbBlock => FORMAT_ASTC_8x6_SRGB_BLOCK [(8, 6)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_8x8UnormBlock => FORMAT_ASTC_8x8_UNORM_BLOCK [(8, 8)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_8x8SrgbBlock => FORMAT_ASTC_8x8_SRGB_BLOCK [(8, 8)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_10x5UnormBlock => FORMAT_ASTC_10x5_UNORM_BLOCK [(10, 5)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_10x5SrgbBlock => FORMAT_ASTC_10x5_SRGB_BLOCK [(10, 5)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_10x6UnormBlock => FORMAT_ASTC_10x6_UNORM_BLOCK [(10, 6)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_10x6SrgbBlock => FORMAT_ASTC_10x6_SRGB_BLOCK [(10, 6)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_10x8UnormBlock => FORMAT_ASTC_10x8_UNORM_BLOCK [(10, 8)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_10x8SrgbBlock => FORMAT_ASTC_10x8_SRGB_BLOCK [(10, 8)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_10x10UnormBlock => FORMAT_ASTC_10x10_UNORM_BLOCK [(10, 10)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_10x10SrgbBlock => FORMAT_ASTC_10x10_SRGB_BLOCK [(10, 10)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_12x10UnormBlock => FORMAT_ASTC_12x10_UNORM_BLOCK [(12, 10)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_12x10SrgbBlock => FORMAT_ASTC_12x10_SRGB_BLOCK [(12, 10)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_12x12UnormBlock => FORMAT_ASTC_12x12_UNORM_BLOCK [(12, 12)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
ASTC_12x12SrgbBlock => FORMAT_ASTC_12x12_SRGB_BLOCK [(12, 12)] [Some(16)] [compressed=texture_compression_astc_ldr] {u8},
}
pub unsafe trait FormatDesc {

View File

@ -16,6 +16,7 @@ use format::PossibleFloatFormatDesc;
use format::PossibleSintFormatDesc;
use format::PossibleStencilFormatDesc;
use format::PossibleUintFormatDesc;
use format::PossibleCompressedFormatDesc;
use image::Dimensions;
use image::ImageDimensions;
use image::ImageLayout;
@ -41,7 +42,7 @@ pub unsafe trait ImageAccess {
#[inline]
fn has_color(&self) -> bool {
let format = self.format();
format.is_float() || format.is_uint() || format.is_sint()
format.is_float() || format.is_uint() || format.is_sint() || format.is_compressed()
}
/// Returns true if the image has a depth component. In other words, if it is a depth or a