#include <assert.h>
#include <util/macros.h>
+#include <util/format/u_format.h>
+#include <vulkan/util/vk_format.h>
#include <vulkan/vulkan.h>
-enum vk_format_layout
+static inline const struct util_format_description *
+vk_format_description(VkFormat format)
{
- /**
- * Formats with vk_format_block::width == vk_format_block::height == 1
- * that can be described as an ordinary data structure.
- */
- VK_FORMAT_LAYOUT_PLAIN = 0,
-
- /**
- * Formats with sub-sampled channels.
- *
- * This is for formats like YVYU where there is less than one sample per
- * pixel.
- */
- VK_FORMAT_LAYOUT_SUBSAMPLED = 3,
-
- /**
- * S3 Texture Compression formats.
- */
- VK_FORMAT_LAYOUT_S3TC = 4,
-
- /**
- * Red-Green Texture Compression formats.
- */
- VK_FORMAT_LAYOUT_RGTC = 5,
-
- /**
- * Ericsson Texture Compression
- */
- VK_FORMAT_LAYOUT_ETC = 6,
-
- /**
- * BC6/7 Texture Compression
- */
- VK_FORMAT_LAYOUT_BPTC = 7,
-
- /**
- * ASTC
- */
- VK_FORMAT_LAYOUT_ASTC = 8,
-
- /**
- * Everything else that doesn't fit in any of the above layouts.
- */
- VK_FORMAT_LAYOUT_OTHER = 9
-};
-
-struct vk_format_block
-{
- /** Block width in pixels */
- unsigned width;
-
- /** Block height in pixels */
- unsigned height;
-
- /** Block size in bits */
- unsigned bits;
-};
-
-enum vk_format_type
-{
- VK_FORMAT_TYPE_VOID = 0,
- VK_FORMAT_TYPE_UNSIGNED = 1,
- VK_FORMAT_TYPE_SIGNED = 2,
- VK_FORMAT_TYPE_FIXED = 3,
- VK_FORMAT_TYPE_FLOAT = 4
-};
-
-enum vk_format_colorspace
-{
- VK_FORMAT_COLORSPACE_RGB = 0,
- VK_FORMAT_COLORSPACE_SRGB = 1,
- VK_FORMAT_COLORSPACE_YUV = 2,
- VK_FORMAT_COLORSPACE_ZS = 3
-};
-
-struct vk_format_channel_description
-{
- unsigned type : 5;
- unsigned normalized : 1;
- unsigned pure_integer : 1;
- unsigned scaled : 1;
- unsigned size : 8;
- unsigned shift : 16;
-};
-
-struct vk_format_description
-{
- VkFormat format;
- const char *name;
- const char *short_name;
-
- struct vk_format_block block;
- enum vk_format_layout layout;
-
- unsigned nr_channels : 3;
- unsigned is_array : 1;
- unsigned is_bitmask : 1;
- unsigned is_mixed : 1;
-
- struct vk_format_channel_description channel[4];
-
- unsigned char swizzle[4];
-
- enum vk_format_colorspace colorspace;
-};
-
-extern const struct vk_format_description vk_format_description_table[];
-
-const struct vk_format_description *
-vk_format_description(VkFormat format);
+ return util_format_description(vk_format_to_pipe_format(format));
+}
/**
* Return total bits needed for the pixel format per block.
static inline unsigned
vk_format_get_blocksizebits(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
-
- assert(desc);
- if (!desc) {
- return 0;
- }
-
- return desc->block.bits;
+ return util_format_get_blocksizebits(vk_format_to_pipe_format(format));
}
/**
static inline unsigned
vk_format_get_blocksize(VkFormat format)
{
- unsigned bits = vk_format_get_blocksizebits(format);
- unsigned bytes = bits / 8;
-
- assert(bits % 8 == 0);
- assert(bytes > 0);
- if (bytes == 0) {
- bytes = 1;
- }
-
- return bytes;
+ return util_format_get_blocksize(vk_format_to_pipe_format(format));
}
static inline unsigned
vk_format_get_blockwidth(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
-
- assert(desc);
- if (!desc) {
- return 1;
- }
-
- return desc->block.width;
+ return util_format_get_blockwidth(vk_format_to_pipe_format(format));
}
static inline unsigned
vk_format_get_blockheight(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
-
- assert(desc);
- if (!desc) {
- return 1;
- }
-
- return desc->block.height;
+ return util_format_get_blockheight(vk_format_to_pipe_format(format));
}
static inline unsigned
vk_format_get_block_count_width(VkFormat format, unsigned width)
{
- unsigned blockwidth = vk_format_get_blockwidth(format);
- return (width + blockwidth - 1) / blockwidth;
+ return util_format_get_nblocksx(vk_format_to_pipe_format(format), width);
}
static inline unsigned
vk_format_get_block_count_height(VkFormat format, unsigned height)
{
- unsigned blockheight = vk_format_get_blockheight(format);
- return (height + blockheight - 1) / blockheight;
+ return util_format_get_nblocksy(vk_format_to_pipe_format(format), height);
}
static inline unsigned
vk_format_get_block_count(VkFormat format, unsigned width, unsigned height)
{
- return vk_format_get_block_count_width(format, width) *
- vk_format_get_block_count_height(format, height);
+ return util_format_get_nblocks(vk_format_to_pipe_format(format),
+ width, height);
}
-/**
- * Return the index of the first non-void channel
- * -1 if no non-void channels
- */
-static inline int
-vk_format_get_first_non_void_channel(VkFormat format)
-{
- const struct vk_format_description *desc = vk_format_description(format);
- int i;
-
- for (i = 0; i < 4; i++)
- if (desc->channel[i].type != VK_FORMAT_TYPE_VOID)
- break;
-
- if (i == 4)
- return -1;
-
- return i;
-}
-
-enum vk_swizzle
-{
- VK_SWIZZLE_X,
- VK_SWIZZLE_Y,
- VK_SWIZZLE_Z,
- VK_SWIZZLE_W,
- VK_SWIZZLE_0,
- VK_SWIZZLE_1,
- VK_SWIZZLE_NONE,
- VK_SWIZZLE_MAX, /**< Number of enums counter (must be last) */
-};
-
static inline VkImageAspectFlags
vk_format_aspects(VkFormat format)
{
}
}
-static inline enum vk_swizzle
+static inline enum pipe_swizzle
tu_swizzle_conv(VkComponentSwizzle component,
const unsigned char chan[4],
VkComponentSwizzle vk_swiz)
vk_swiz = component;
switch (vk_swiz) {
case VK_COMPONENT_SWIZZLE_ZERO:
- return VK_SWIZZLE_0;
+ return PIPE_SWIZZLE_0;
case VK_COMPONENT_SWIZZLE_ONE:
- return VK_SWIZZLE_1;
+ return PIPE_SWIZZLE_1;
case VK_COMPONENT_SWIZZLE_R:
for (x = 0; x < 4; x++)
if (chan[x] == 0)
return x;
- return VK_SWIZZLE_0;
+ return PIPE_SWIZZLE_0;
case VK_COMPONENT_SWIZZLE_G:
for (x = 0; x < 4; x++)
if (chan[x] == 1)
return x;
- return VK_SWIZZLE_0;
+ return PIPE_SWIZZLE_0;
case VK_COMPONENT_SWIZZLE_B:
for (x = 0; x < 4; x++)
if (chan[x] == 2)
return x;
- return VK_SWIZZLE_0;
+ return PIPE_SWIZZLE_0;
case VK_COMPONENT_SWIZZLE_A:
for (x = 0; x < 4; x++)
if (chan[x] == 3)
return x;
- return VK_SWIZZLE_1;
+ return PIPE_SWIZZLE_1;
default:
unreachable("Illegal swizzle");
}
static inline void
vk_format_compose_swizzles(const VkComponentMapping *mapping,
const unsigned char swz[4],
- enum vk_swizzle dst[4])
+ enum pipe_swizzle dst[4])
{
dst[0] = tu_swizzle_conv(VK_COMPONENT_SWIZZLE_R, swz, mapping->r);
dst[1] = tu_swizzle_conv(VK_COMPONENT_SWIZZLE_G, swz, mapping->g);
static inline bool
vk_format_is_compressed(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
-
- assert(desc);
- if (!desc) {
- return false;
- }
-
- switch (desc->layout) {
- case VK_FORMAT_LAYOUT_S3TC:
- case VK_FORMAT_LAYOUT_RGTC:
- case VK_FORMAT_LAYOUT_ETC:
- case VK_FORMAT_LAYOUT_BPTC:
- case VK_FORMAT_LAYOUT_ASTC:
- /* XXX add other formats in the future */
- return true;
- default:
- return false;
- }
-}
-
-static inline bool
-vk_format_has_depth(const struct vk_format_description *desc)
-{
- return desc->colorspace == VK_FORMAT_COLORSPACE_ZS &&
- desc->swizzle[0] != VK_SWIZZLE_NONE;
-}
-
-static inline bool
-vk_format_has_stencil(const struct vk_format_description *desc)
-{
- return desc->colorspace == VK_FORMAT_COLORSPACE_ZS &&
- desc->swizzle[1] != VK_SWIZZLE_NONE;
+ return util_format_is_compressed(vk_format_to_pipe_format(format));
}
static inline bool
-vk_format_is_depth_or_stencil(VkFormat format)
+vk_format_has_depth(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
+ const struct util_format_description *desc = vk_format_description(format);
- assert(desc);
- if (!desc) {
- return false;
- }
-
- return vk_format_has_depth(desc) || vk_format_has_stencil(desc);
+ return util_format_has_depth(desc);
}
static inline bool
-vk_format_is_depth(VkFormat format)
+vk_format_has_stencil(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
-
- assert(desc);
- if (!desc) {
- return false;
- }
+ const struct util_format_description *desc = vk_format_description(format);
- return vk_format_has_depth(desc);
+ return util_format_has_stencil(desc);
}
static inline bool
-vk_format_is_stencil(VkFormat format)
+vk_format_is_depth_or_stencil(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
-
- assert(desc);
- if (!desc) {
- return false;
- }
-
- return vk_format_has_stencil(desc);
+ return vk_format_has_depth(format) || vk_format_has_stencil(format);
}
static inline bool
static inline bool
vk_format_has_alpha(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
-
- return (desc->colorspace == VK_FORMAT_COLORSPACE_RGB ||
- desc->colorspace == VK_FORMAT_COLORSPACE_SRGB) &&
- desc->swizzle[3] != VK_SWIZZLE_1;
+ return util_format_has_alpha(vk_format_to_pipe_format(format));
}
static inline VkFormat
static inline bool
vk_format_is_int(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
- int channel = vk_format_get_first_non_void_channel(format);
-
- return channel >= 0 && desc->channel[channel].pure_integer;
+ return util_format_is_pure_integer(vk_format_to_pipe_format(format));
}
static inline bool
vk_format_is_uint(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
- int channel = vk_format_get_first_non_void_channel(format);
-
- return channel >= 0 &&
- desc->channel[channel].pure_integer &&
- desc->channel[channel].type != VK_FORMAT_TYPE_SIGNED;
+ return util_format_is_pure_uint(vk_format_to_pipe_format(format));
}
static inline bool
vk_format_is_sint(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
- int channel = vk_format_get_first_non_void_channel(format);
-
- return channel >= 0 &&
- desc->channel[channel].pure_integer &&
- desc->channel[channel].type == VK_FORMAT_TYPE_SIGNED;
+ return util_format_is_pure_sint(vk_format_to_pipe_format(format));
}
static inline bool
vk_format_is_srgb(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
- return desc->colorspace == VK_FORMAT_COLORSPACE_SRGB;
+ return util_format_is_srgb(vk_format_to_pipe_format(format));
}
static inline VkFormat
static inline unsigned
vk_format_get_component_bits(VkFormat format,
- enum vk_format_colorspace colorspace,
+ enum util_format_colorspace colorspace,
unsigned component)
{
- const struct vk_format_description *desc = vk_format_description(format);
- enum vk_format_colorspace desc_colorspace;
-
- assert(format);
- if (!format) {
- return 0;
- }
-
- assert(component < 4);
-
- /* Treat RGB and SRGB as equivalent. */
- if (colorspace == VK_FORMAT_COLORSPACE_SRGB) {
- colorspace = VK_FORMAT_COLORSPACE_RGB;
- }
- if (desc->colorspace == VK_FORMAT_COLORSPACE_SRGB) {
- desc_colorspace = VK_FORMAT_COLORSPACE_RGB;
- } else {
- desc_colorspace = desc->colorspace;
- }
-
- if (desc_colorspace != colorspace) {
- return 0;
- }
-
- switch (desc->swizzle[component]) {
- case VK_SWIZZLE_X:
- return desc->channel[0].size;
- case VK_SWIZZLE_Y:
- return desc->channel[1].size;
- case VK_SWIZZLE_Z:
- return desc->channel[2].size;
- case VK_SWIZZLE_W:
- return desc->channel[3].size;
- default:
- return 0;
- }
-}
-
-static inline VkFormat
-vk_to_non_srgb_format(VkFormat format)
-{
- switch (format) {
- case VK_FORMAT_R8_SRGB:
- return VK_FORMAT_R8_UNORM;
- case VK_FORMAT_R8G8_SRGB:
- return VK_FORMAT_R8G8_UNORM;
- case VK_FORMAT_R8G8B8_SRGB:
- return VK_FORMAT_R8G8B8_UNORM;
- case VK_FORMAT_B8G8R8_SRGB:
- return VK_FORMAT_B8G8R8_UNORM;
- case VK_FORMAT_R8G8B8A8_SRGB:
- return VK_FORMAT_R8G8B8A8_UNORM;
- case VK_FORMAT_B8G8R8A8_SRGB:
- return VK_FORMAT_B8G8R8A8_UNORM;
- case VK_FORMAT_A8B8G8R8_SRGB_PACK32:
- return VK_FORMAT_A8B8G8R8_UNORM_PACK32;
- default:
- return format;
- }
+ return util_format_get_component_bits(vk_format_to_pipe_format(format),
+ colorspace, component);
}
static inline unsigned
vk_format_get_nr_components(VkFormat format)
{
- const struct vk_format_description *desc = vk_format_description(format);
- return desc->nr_channels;
+ return util_format_get_nr_components(vk_format_to_pipe_format(format));
}
#endif /* VK_FORMAT_H */
+++ /dev/null
-/* this is pretty much taken from the gallium one. */
-
-
-VK_FORMAT_UNDEFINED , plain, 1, 1, u8 , , , , x001, rgb
-VK_FORMAT_R4G4_UNORM_PACK8 , plain, 1, 1, un4 , un4 , , , xy01, rgb
-VK_FORMAT_R4G4B4A4_UNORM_PACK16 , plain, 1, 1, un4 , un4 , un4 , un4 , wzyx, rgb
-VK_FORMAT_B4G4R4A4_UNORM_PACK16 , plain, 1, 1, un4 , un4 , un4 , un4 , wxyz, rgb
-VK_FORMAT_R5G6B5_UNORM_PACK16 , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb
-VK_FORMAT_B5G6R5_UNORM_PACK16 , plain, 1, 1, un5 , un6 , un5 , , xyz1, rgb
-VK_FORMAT_R5G5B5A1_UNORM_PACK16 , plain, 1, 1, un1 , un5 , un5 , un5 , wzyx, rgb
-VK_FORMAT_B5G5R5A1_UNORM_PACK16 , plain, 1, 1, un1 , un5 , un5 , un5 , wxyz, rgb
-VK_FORMAT_A1R5G5B5_UNORM_PACK16 , plain, 1, 1, un5 , un5 , un5 , un1 , zyxw, rgb
-VK_FORMAT_R8_UNORM , plain, 1, 1, un8 , , , , x001, rgb
-VK_FORMAT_R8_SNORM , plain, 1, 1, sn8 , , , , x001, rgb
-VK_FORMAT_R8_USCALED , plain, 1, 1, us8 , , , , x001, rgb
-VK_FORMAT_R8_SSCALED , plain, 1, 1, ss8 , , , , x001, rgb
-VK_FORMAT_R8_UINT , plain, 1, 1, up8 , , , , x001, rgb
-VK_FORMAT_R8_SINT , plain, 1, 1, sp8 , , , , x001, rgb
-VK_FORMAT_R8_SRGB , plain, 1, 1, un8 , , , , x001, srgb
-VK_FORMAT_R8G8_UNORM , plain, 1, 1, un8 , un8 , , , xy01, rgb
-VK_FORMAT_R8G8_SNORM , plain, 1, 1, sn8 , sn8 , , , xy01, rgb
-VK_FORMAT_R8G8_USCALED , plain, 1, 1, us8 , us8 , , , xy01, rgb
-VK_FORMAT_R8G8_SSCALED , plain, 1, 1, ss8 , ss8 , , , xy01, rgb
-VK_FORMAT_R8G8_UINT , plain, 1, 1, up8 , up8 , , , xy01, rgb
-VK_FORMAT_R8G8_SINT , plain, 1, 1, sp8 , sp8 , , , xy01, rgb
-VK_FORMAT_R8G8_SRGB , plain, 1, 1, un8 , un8 , , , xy01, srgb
-VK_FORMAT_R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , , xyz1, rgb
-VK_FORMAT_R8G8B8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , , xyz1, rgb
-VK_FORMAT_R8G8B8_USCALED , plain, 1, 1, us8 , us8 , us8 , , xyz1, rgb
-VK_FORMAT_R8G8B8_SSCALED , plain, 1, 1, ss8 , ss8 , ss8 , , xyz1, rgb
-VK_FORMAT_R8G8B8_UINT , plain, 1, 1, up8 , up8 , up8 , , xyz1, rgb
-VK_FORMAT_R8G8B8_SINT , plain, 1, 1, sp8 , sp8 , sp8 , , xyz1, rgb
-VK_FORMAT_R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , , xyz1, srgb
-VK_FORMAT_B8G8R8_UNORM , plain, 1, 1, un8 , un8 , un8 , , zyx1, rgb
-VK_FORMAT_B8G8R8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , , zyx1, rgb
-VK_FORMAT_B8G8R8_USCALED , plain, 1, 1, us8 , us8 , us8 , , zyx1, rgb
-VK_FORMAT_B8G8R8_SSCALED , plain, 1, 1, ss8 , ss8 , ss8 , , zyx1, rgb
-VK_FORMAT_B8G8R8_UINT , plain, 1, 1, up8 , up8 , up8 , , zyx1, rgb
-VK_FORMAT_B8G8R8_SINT , plain, 1, 1, sp8 , sp8 , sp8 , , zyx1, rgb
-VK_FORMAT_B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , , zyx1, srgb
-VK_FORMAT_R8G8B8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, rgb
-VK_FORMAT_R8G8B8A8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , sn8 , xyzw, rgb
-VK_FORMAT_R8G8B8A8_USCALED , plain, 1, 1, us8 , us8 , us8 , us8 , xyzw, rgb
-VK_FORMAT_R8G8B8A8_SSCALED , plain, 1, 1, ss8 , ss8 , ss8 , ss8 , xyzw, rgb
-VK_FORMAT_R8G8B8A8_UINT , plain, 1, 1, up8 , up8 , up8 , up8 , xyzw, rgb
-VK_FORMAT_R8G8B8A8_SINT , plain, 1, 1, sp8 , sp8 , sp8 , sp8 , xyzw, rgb
-VK_FORMAT_R8G8B8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, srgb
-VK_FORMAT_B8G8R8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, rgb
-VK_FORMAT_B8G8R8A8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , sn8 , zyxw, rgb
-VK_FORMAT_B8G8R8A8_USCALED , plain, 1, 1, us8 , us8 , us8 , us8 , zyxw, rgb
-VK_FORMAT_B8G8R8A8_SSCALED , plain, 1, 1, ss8 , ss8 , ss8 , ss8 , zyxw, rgb
-VK_FORMAT_B8G8R8A8_UINT , plain, 1, 1, up8 , up8 , up8 , up8 , zyxw, rgb
-VK_FORMAT_B8G8R8A8_SINT , plain, 1, 1, sp8 , sp8 , sp8 , sp8 , zyxw, rgb
-VK_FORMAT_B8G8R8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb
-VK_FORMAT_A8B8G8R8_UNORM_PACK32 , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, rgb
-VK_FORMAT_A8B8G8R8_SNORM_PACK32 , plain, 1, 1, sn8 , sn8 , sn8 , sn8 , xyzw, rgb
-VK_FORMAT_A8B8G8R8_USCALED_PACK32 , plain, 1, 1, us8 , us8 , us8 , us8 , xyzw, rgb
-VK_FORMAT_A8B8G8R8_SSCALED_PACK32 , plain, 1, 1, ss8 , ss8 , ss8 , ss8 , xyzw, rgb
-VK_FORMAT_A8B8G8R8_UINT_PACK32 , plain, 1, 1, up8 , up8 , up8 , up8 , xyzw, rgb
-VK_FORMAT_A8B8G8R8_SINT_PACK32 , plain, 1, 1, sp8 , sp8 , sp8 , sp8 , xyzw, rgb
-VK_FORMAT_A8B8G8R8_SRGB_PACK32 , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, srgb
-VK_FORMAT_A2R10G10B10_UNORM_PACK32 , plain, 1, 1, un10, un10, un10, un2 , zyxw, rgb
-VK_FORMAT_A2R10G10B10_SNORM_PACK32 , plain, 1, 1, sn10, sn10, sn10, sn2 , zyxw, rgb
-VK_FORMAT_A2R10G10B10_USCALED_PACK32 , plain, 1, 1, us10, us10, us10, us2 , zyxw, rgb
-VK_FORMAT_A2R10G10B10_SSCALED_PACK32 , plain, 1, 1, ss10, ss10, ss10, ss2 , zyxw, rgb
-VK_FORMAT_A2R10G10B10_UINT_PACK32 , plain, 1, 1, up10, up10, up10, up2 , zyxw, rgb
-VK_FORMAT_A2R10G10B10_SINT_PACK32 , plain, 1, 1, sp10, sp10, sp10, sp2 , zyxw, rgb
-VK_FORMAT_A2B10G10R10_UNORM_PACK32 , plain, 1, 1, un10, un10, un10, un2 , xyzw, rgb
-VK_FORMAT_A2B10G10R10_SNORM_PACK32 , plain, 1, 1, sn10, sn10, sn10, sn2 , xyzw, rgb
-VK_FORMAT_A2B10G10R10_USCALED_PACK32 , plain, 1, 1, us10, us10, us10, us2 , xyzw, rgb
-VK_FORMAT_A2B10G10R10_SSCALED_PACK32 , plain, 1, 1, ss10, ss10, ss10, ss2 , xyzw, rgb
-VK_FORMAT_A2B10G10R10_UINT_PACK32 , plain, 1, 1, up10, up10, up10, up2 , xyzw, rgb
-VK_FORMAT_A2B10G10R10_SINT_PACK32 , plain, 1, 1, sp10, sp10, sp10, sp2 , xyzw, rgb
-VK_FORMAT_R16_UNORM , plain, 1, 1, un16, , , , x001, rgb
-VK_FORMAT_R16_SNORM , plain, 1, 1, sn16, , , , x001, rgb
-VK_FORMAT_R16_USCALED , plain, 1, 1, us16, , , , x001, rgb
-VK_FORMAT_R16_SSCALED , plain, 1, 1, ss16, , , , x001, rgb
-VK_FORMAT_R16_UINT , plain, 1, 1, up16, , , , x001, rgb
-VK_FORMAT_R16_SINT , plain, 1, 1, sp16, , , , x001, rgb
-VK_FORMAT_R16_SFLOAT , plain, 1, 1, f16 , , , , x001, rgb
-VK_FORMAT_R16G16_UNORM , plain, 1, 1, un16, un16, , , xy01, rgb
-VK_FORMAT_R16G16_SNORM , plain, 1, 1, sn16, sn16, , , xy01, rgb
-VK_FORMAT_R16G16_USCALED , plain, 1, 1, us16, us16, , , xy01, rgb
-VK_FORMAT_R16G16_SSCALED , plain, 1, 1, ss16, ss16, , , xy01, rgb
-VK_FORMAT_R16G16_UINT , plain, 1, 1, up16, up16, , , xy01, rgb
-VK_FORMAT_R16G16_SINT , plain, 1, 1, sp16, sp16, , , xy01, rgb
-VK_FORMAT_R16G16_SFLOAT , plain, 1, 1, f16 , f16 , , , xy01, rgb
-VK_FORMAT_R16G16B16_UNORM , plain, 1, 1, un16, un16, un16, , xyz1, rgb
-VK_FORMAT_R16G16B16_SNORM , plain, 1, 1, sn16, sn16, sn16, , xyz1, rgb
-VK_FORMAT_R16G16B16_USCALED , plain, 1, 1, us16, us16, us16, , xyz1, rgb
-VK_FORMAT_R16G16B16_SSCALED , plain, 1, 1, ss16, ss16, ss16, , xyz1, rgb
-VK_FORMAT_R16G16B16_UINT , plain, 1, 1, up16, up16, up16, , xyz1, rgb
-VK_FORMAT_R16G16B16_SINT , plain, 1, 1, sp16, sp16, sp16, , xyz1, rgb
-VK_FORMAT_R16G16B16_SFLOAT , plain, 1, 1, f16 , f16 , f16 , , xyz1, rgb
-VK_FORMAT_R16G16B16A16_UNORM , plain, 1, 1, un16, un16, un16, un16, xyzw, rgb
-VK_FORMAT_R16G16B16A16_SNORM , plain, 1, 1, sn16, sn16, sn16, sn16, xyzw, rgb
-VK_FORMAT_R16G16B16A16_USCALED , plain, 1, 1, us16, us16, us16, us16, xyzw, rgb
-VK_FORMAT_R16G16B16A16_SSCALED , plain, 1, 1, ss16, ss16, ss16, ss16, xyzw, rgb
-VK_FORMAT_R16G16B16A16_UINT , plain, 1, 1, up16, up16, up16, up16, xyzw, rgb
-VK_FORMAT_R16G16B16A16_SINT , plain, 1, 1, sp16, sp16, sp16, sp16, xyzw, rgb
-VK_FORMAT_R16G16B16A16_SFLOAT , plain, 1, 1, f16 , f16 , f16 , f16 , xyzw, rgb
-VK_FORMAT_R32_UINT , plain, 1, 1, up32, , , , x001, rgb
-VK_FORMAT_R32_SINT , plain, 1, 1, sp32, , , , x001, rgb
-VK_FORMAT_R32_SFLOAT , plain, 1, 1, f32 , , , , x001, rgb
-VK_FORMAT_R32G32_UINT , plain, 1, 1, up32, up32, , , xy01, rgb
-VK_FORMAT_R32G32_SINT , plain, 1, 1, sp32, sp32, , , xy01, rgb
-VK_FORMAT_R32G32_SFLOAT , plain, 1, 1, f32 , f32 , , , xy01, rgb
-VK_FORMAT_R32G32B32_UINT , plain, 1, 1, up32, up32, up32, , xyz1, rgb
-VK_FORMAT_R32G32B32_SINT , plain, 1, 1, sp32, sp32, sp32, , xyz1, rgb
-VK_FORMAT_R32G32B32_SFLOAT , plain, 1, 1, f32 , f32 , f32 , , xyz1, rgb
-VK_FORMAT_R32G32B32A32_UINT , plain, 1, 1, up32, up32, up32, up32, xyzw, rgb
-VK_FORMAT_R32G32B32A32_SINT , plain, 1, 1, sp32, sp32, sp32, sp32, xyzw, rgb
-VK_FORMAT_R32G32B32A32_SFLOAT , plain, 1, 1, f32 , f32 , f32 , f32 , xyzw, rgb
-VK_FORMAT_R64_UINT , plain, 1, 1, up64, , , , x001, rgb
-VK_FORMAT_R64_SINT , plain, 1, 1, sp64, , , , x001, rgb
-VK_FORMAT_R64_SFLOAT , plain, 1, 1, f64 , , , , x001, rgb
-VK_FORMAT_R64G64_UINT , plain, 1, 1, up64, up64, , , xy01, rgb
-VK_FORMAT_R64G64_SINT , plain, 1, 1, sp64, sp64, , , xy01, rgb
-VK_FORMAT_R64G64_SFLOAT , plain, 1, 1, f64 , f64 , , , xy01, rgb
-VK_FORMAT_R64G64B64_UINT , plain, 1, 1, up64, up64, up64, , xyz1, rgb
-VK_FORMAT_R64G64B64_SINT , plain, 1, 1, sp64, sp64, sp64, , xyz1, rgb
-VK_FORMAT_R64G64B64_SFLOAT , plain, 1, 1, f64 , f64 , f64 , , xyz1, rgb
-VK_FORMAT_R64G64B64A64_UINT , plain, 1, 1, up64, up64, up64, up64, xyzw, rgb
-VK_FORMAT_R64G64B64A64_SINT , plain, 1, 1, sp64, sp64, sp64, sp64, xyzw, rgb
-VK_FORMAT_R64G64B64A64_SFLOAT , plain, 1, 1, f64 , f64 , f64 , f64 , xyzw, rgb
-VK_FORMAT_B10G11R11_UFLOAT_PACK32 , plain, 1, 1, f10 , f11 , f11 , , xyz1, rgb
-VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 , other, 1, 1, x32 , , , , xyz1, rgb
-VK_FORMAT_D16_UNORM , plain, 1, 1, un16, , , , x___, zs
-VK_FORMAT_X8_D24_UNORM_PACK32 , plain, 1, 1, un24, x8 , , , x___, zs
-VK_FORMAT_D32_SFLOAT , plain, 1, 1, f32 , , , , x___, zs
-VK_FORMAT_S8_UINT , plain, 1, 1, up8 , , , , _x__, zs
-VK_FORMAT_D16_UNORM_S8_UINT , plain, 1, 1, un16, up8 , , , xy__, zs
-VK_FORMAT_D24_UNORM_S8_UINT , plain, 1, 1, un24, up8 , , , xy__, zs
-VK_FORMAT_D32_SFLOAT_S8_UINT , plain, 1, 1, f32 , up8 , , , xy__, zs
-VK_FORMAT_BC1_RGB_UNORM_BLOCK , s3tc, 4, 4, x64 , , , , xyz1, rgb
-VK_FORMAT_BC1_RGB_SRGB_BLOCK , s3tc, 4, 4, x64 , , , , xyz1, srgb
-VK_FORMAT_BC1_RGBA_UNORM_BLOCK , s3tc, 4, 4, x64 , , , , xyzw, rgb
-VK_FORMAT_BC1_RGBA_SRGB_BLOCK , s3tc, 4, 4, x64 , , , , xyzw, srgb
-VK_FORMAT_BC2_UNORM_BLOCK , s3tc, 4, 4, x128, , , , xyzw, rgb
-VK_FORMAT_BC2_SRGB_BLOCK , s3tc, 4, 4, x128, , , , xyzw, srgb
-VK_FORMAT_BC3_UNORM_BLOCK , s3tc, 4, 4, x128, , , , xyzw, rgb
-VK_FORMAT_BC3_SRGB_BLOCK , s3tc, 4, 4, x128, , , , xyzw, srgb
-VK_FORMAT_BC4_UNORM_BLOCK , rgtc, 4, 4, x64, , , , x001, rgb
-VK_FORMAT_BC4_SNORM_BLOCK , rgtc, 4, 4, x64, , , , x001, rgb
-VK_FORMAT_BC5_UNORM_BLOCK , rgtc, 4, 4, x128, , , , xy01, rgb
-VK_FORMAT_BC5_SNORM_BLOCK , rgtc, 4, 4, x128, , , , xy01, rgb
-VK_FORMAT_BC6H_UFLOAT_BLOCK , bptc, 4, 4, x128, , , , xyz1, rgb
-VK_FORMAT_BC6H_SFLOAT_BLOCK , bptc, 4, 4, x128, , , , xyz1, rgb
-VK_FORMAT_BC7_UNORM_BLOCK , bptc, 4, 4, x128, , , , xyzw, rgb
-VK_FORMAT_BC7_SRGB_BLOCK , bptc, 4, 4, x128, , , , xyzw, srgb
-VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK , etc, 4, 4, x64, , , , xyz1, rgb
-VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK , etc, 4, 4, x64, , , , xyz1, srgb
-VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK , etc, 4, 4, x64, , , , xyzw, rgb
-VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK , etc, 4, 4, x64, , , , xyzw, srgb
-VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK , etc, 4, 4, x128, , , , xyzw, rgb
-VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK , etc, 4, 4, x128, , , , xyzw, srgb
-VK_FORMAT_EAC_R11_UNORM_BLOCK , etc, 4, 4, x64, , , , x001, rgb
-VK_FORMAT_EAC_R11_SNORM_BLOCK , etc, 4, 4, x64, , , , x001, rgb
-VK_FORMAT_EAC_R11G11_UNORM_BLOCK , etc, 4, 4, x128, , , , xy01, rgb
-VK_FORMAT_EAC_R11G11_SNORM_BLOCK , etc, 4, 4, x128, , , , xy01, rgb
-VK_FORMAT_ASTC_4x4_UNORM_BLOCK , astc, 4, 4, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_5x4_UNORM_BLOCK , astc, 5, 4, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_5x5_UNORM_BLOCK , astc, 5, 5, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_6x5_UNORM_BLOCK , astc, 6, 5, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_6x6_UNORM_BLOCK , astc, 6, 6, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_8x5_UNORM_BLOCK , astc, 8, 5, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_8x6_UNORM_BLOCK , astc, 8, 6, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_8x8_UNORM_BLOCK , astc, 8, 8, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_10x5_UNORM_BLOCK , astc, 10, 5, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_10x6_UNORM_BLOCK , astc, 10, 6, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_10x8_UNORM_BLOCK , astc, 10, 8, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_10x10_UNORM_BLOCK , astc, 10,10, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_12x10_UNORM_BLOCK , astc, 12,10, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_12x12_UNORM_BLOCK , astc, 12,12, x128, , , , xyzw, rgb
-VK_FORMAT_ASTC_4x4_SRGB_BLOCK , astc, 4, 4, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_5x4_SRGB_BLOCK , astc, 5, 4, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_5x5_SRGB_BLOCK , astc, 5, 5, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_6x5_SRGB_BLOCK , astc, 6, 5, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_6x6_SRGB_BLOCK , astc, 6, 6, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_8x5_SRGB_BLOCK , astc, 8, 5, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_8x6_SRGB_BLOCK , astc, 8, 6, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_8x8_SRGB_BLOCK , astc, 8, 8, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_10x5_SRGB_BLOCK , astc, 10, 5, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_10x6_SRGB_BLOCK , astc, 10, 6, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_10x8_SRGB_BLOCK , astc, 10, 8, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_10x10_SRGB_BLOCK , astc, 10,10, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_12x10_SRGB_BLOCK , astc, 12,10, x128, , , , xyzw, srgb
-VK_FORMAT_ASTC_12x12_SRGB_BLOCK , astc, 12,12, x128, , , , xyzw, srgb