PIPE_FORMAT_R8_USCALED,
PIPE_FORMAT_R8G8_USCALED,
PIPE_FORMAT_R8G8B8_USCALED,
+ PIPE_FORMAT_B8G8R8_USCALED,
PIPE_FORMAT_R8G8B8A8_USCALED,
+ PIPE_FORMAT_B8G8R8A8_USCALED,
+ PIPE_FORMAT_A8B8G8R8_USCALED,
PIPE_FORMAT_R8_SNORM,
PIPE_FORMAT_R8G8_SNORM,
PIPE_FORMAT_R8G8B8_SNORM,
+ PIPE_FORMAT_B8G8R8_SNORM,
PIPE_FORMAT_R8G8B8A8_SNORM,
+ PIPE_FORMAT_B8G8R8A8_SNORM,
PIPE_FORMAT_R8_SSCALED,
PIPE_FORMAT_R8G8_SSCALED,
PIPE_FORMAT_R8G8B8_SSCALED,
+ PIPE_FORMAT_B8G8R8_SSCALED,
PIPE_FORMAT_R8G8B8A8_SSCALED,
+ PIPE_FORMAT_B8G8R8A8_SSCALED,
+ PIPE_FORMAT_A8B8G8R8_SSCALED,
PIPE_FORMAT_R32_FIXED,
PIPE_FORMAT_R32G32_FIXED,
PIPE_FORMAT_R32G32B32_FIXED,
/* sRGB formats */
PIPE_FORMAT_L8_SRGB,
+ PIPE_FORMAT_R8_SRGB,
PIPE_FORMAT_L8A8_SRGB,
+ PIPE_FORMAT_R8G8_SRGB,
PIPE_FORMAT_R8G8B8_SRGB,
+ PIPE_FORMAT_B8G8R8_SRGB,
PIPE_FORMAT_A8B8G8R8_SRGB,
PIPE_FORMAT_X8B8G8R8_SRGB,
PIPE_FORMAT_B8G8R8A8_SRGB,
PIPE_FORMAT_L32_SINT,
PIPE_FORMAT_L32A32_SINT,
+ PIPE_FORMAT_B8G8R8_UINT,
PIPE_FORMAT_B8G8R8A8_UINT,
+
+ PIPE_FORMAT_B8G8R8_SINT,
+ PIPE_FORMAT_B8G8R8A8_SINT,
+
PIPE_FORMAT_A8R8G8B8_UINT,
PIPE_FORMAT_A8B8G8R8_UINT,
PIPE_FORMAT_A2R10G10B10_UINT,
PIPE_FORMAT_A2B10G10R10_UINT,
PIPE_FORMAT_B10G10R10A2_UINT,
+ PIPE_FORMAT_B10G10R10A2_SINT,
PIPE_FORMAT_R5G6B5_UINT,
PIPE_FORMAT_B5G6R5_UINT,
PIPE_FORMAT_R5G5B5A1_UINT,
PIPE_FORMAT_R32A32_UINT,
PIPE_FORMAT_R32A32_SINT,
PIPE_FORMAT_R10G10B10A2_UINT,
+ PIPE_FORMAT_R10G10B10A2_SINT,
PIPE_FORMAT_B5G6R5_SRGB,
PIPE_FORMAT_A4R4G4B4_UNORM,
PIPE_FORMAT_A4B4G4R4_UNORM,
- PIPE_FORMAT_R8_SRGB,
-
PIPE_FORMAT_G8R8_SINT,
PIPE_FORMAT_A8B8G8R8_SINT,
PIPE_FORMAT_X8B8G8R8_SINT,
#define PIPE_FORMAT_XRGB8888_SRGB PIPE_FORMAT_X8R8G8B8_SRGB
#define PIPE_FORMAT_ABGR8888_SRGB PIPE_FORMAT_A8B8G8R8_SRGB
#define PIPE_FORMAT_XBGR8888_SRGB PIPE_FORMAT_X8B8G8R8_SRGB
+#define PIPE_FORMAT_RGBA8888_USCALED PIPE_FORMAT_R8G8B8A8_USCALED
+#define PIPE_FORMAT_RGBA8888_SSCALED PIPE_FORMAT_R8G8B8A8_SSCALED
#define PIPE_FORMAT_RGBA8888_UINT PIPE_FORMAT_R8G8B8A8_UINT
#define PIPE_FORMAT_BGRA8888_UINT PIPE_FORMAT_B8G8R8A8_UINT
#define PIPE_FORMAT_ARGB8888_UINT PIPE_FORMAT_A8R8G8B8_UINT
#define PIPE_FORMAT_ABGR8888_UINT PIPE_FORMAT_A8B8G8R8_UINT
+#define PIPE_FORMAT_RGBA8888_SINT PIPE_FORMAT_R8G8B8A8_SINT
#define PIPE_FORMAT_RG88_UNORM PIPE_FORMAT_R8G8_UNORM
#define PIPE_FORMAT_GR88_UNORM PIPE_FORMAT_G8R8_UNORM
#define PIPE_FORMAT_RG88_SNORM PIPE_FORMAT_R8G8_SNORM
#define PIPE_FORMAT_BGRX8888_SRGB PIPE_FORMAT_X8R8G8B8_SRGB
#define PIPE_FORMAT_RGBA8888_SRGB PIPE_FORMAT_A8B8G8R8_SRGB
#define PIPE_FORMAT_RGBX8888_SRGB PIPE_FORMAT_X8B8G8R8_SRGB
+#define PIPE_FORMAT_RGBA8888_USCALED PIPE_FORMAT_A8B8G8R8_USCALED
+#define PIPE_FORMAT_RGBA8888_SSCALED PIPE_FORMAT_A8B8G8R8_SSCALED
#define PIPE_FORMAT_RGBA8888_UINT PIPE_FORMAT_A8B8G8R8_UINT
#define PIPE_FORMAT_BGRA8888_UINT PIPE_FORMAT_A8R8G8B8_UINT
#define PIPE_FORMAT_ARGB8888_UINT PIPE_FORMAT_B8G8R8A8_UINT
#define PIPE_FORMAT_ABGR8888_UINT PIPE_FORMAT_R8G8B8A8_UINT
+#define PIPE_FORMAT_RGBA8888_SINT PIPE_FORMAT_A8B8G8R8_SINT
#define PIPE_FORMAT_RG88_UNORM PIPE_FORMAT_G8R8_UNORM
#define PIPE_FORMAT_GR88_UNORM PIPE_FORMAT_R8G8_UNORM
#define PIPE_FORMAT_RG88_SNORM PIPE_FORMAT_G8R8_SNORM
# SRGB formats
PIPE_FORMAT_L8_SRGB , plain, 1, 1, 1, un8 , , , , xxx1, srgb
PIPE_FORMAT_R8_SRGB , plain, 1, 1, 1, un8 , , , , x001, srgb
-PIPE_FORMAT_L8A8_SRGB , plain, 1, 1, 1, un8 , un8 , , , xxxy, srgb
-PIPE_FORMAT_R8G8B8_SRGB , plain, 1, 1, 1, un8 , un8 , un8 , , xyz1, srgb
+PIPE_FORMAT_L8A8_SRGB , plain, 1, 1, 1, un8 , un8 , , , xxxy, srgb
+PIPE_FORMAT_R8G8_SRGB , plain, 1, 1, 1, un8 , un8 , , , xy01, srgb
+PIPE_FORMAT_R8G8B8_SRGB , plain, 1, 1, 1, un8 , un8 , un8 , , xyz1, srgb
+PIPE_FORMAT_B8G8R8_SRGB , plain, 1, 1, 1, un8 , un8 , un8 , , zyx1, srgb
PIPE_FORMAT_R8G8B8A8_SRGB , plain, 1, 1, 1, un8 , un8 , un8 , un8 , xyzw, srgb
PIPE_FORMAT_A8B8G8R8_SRGB , plain, 1, 1, 1, un8 , un8 , un8 , un8 , wzyx, srgb
PIPE_FORMAT_X8B8G8R8_SRGB , plain, 1, 1, 1, x8 , un8 , un8 , un8 , wzy1, srgb
PIPE_FORMAT_R8_USCALED , plain, 1, 1, 1, u8 , , , , x001, rgb
PIPE_FORMAT_R8G8_USCALED , plain, 1, 1, 1, u8 , u8 , , , xy01, rgb
PIPE_FORMAT_R8G8B8_USCALED , plain, 1, 1, 1, u8 , u8 , u8 , , xyz1, rgb
+PIPE_FORMAT_B8G8R8_USCALED , plain, 1, 1, 1, u8 , u8 , u8 , , zyx1, rgb
PIPE_FORMAT_R8G8B8A8_USCALED , plain, 1, 1, 1, u8 , u8 , u8 , u8 , xyzw, rgb
+PIPE_FORMAT_B8G8R8A8_USCALED , plain, 1, 1, 1, u8 , u8 , u8 , u8 , zyxw, rgb
+PIPE_FORMAT_A8B8G8R8_USCALED , plain, 1, 1, 1, u8 , u8 , u8 , u8 , wzyx, rgb
PIPE_FORMAT_R8_SNORM , plain, 1, 1, 1, sn8 , , , , x001, rgb
PIPE_FORMAT_R8G8_SNORM , plain, 1, 1, 1, sn8 , sn8 , , , xy01, rgb
PIPE_FORMAT_R8G8B8_SNORM , plain, 1, 1, 1, sn8 , sn8 , sn8 , , xyz1, rgb
+PIPE_FORMAT_B8G8R8_SNORM , plain, 1, 1, 1, sn8 , sn8 , sn8 , , zyx1, rgb
PIPE_FORMAT_R8G8B8A8_SNORM , plain, 1, 1, 1, sn8 , sn8 , sn8 , sn8 , xyzw, rgb
+PIPE_FORMAT_B8G8R8A8_SNORM , plain, 1, 1, 1, sn8 , sn8 , sn8 , sn8 , zyxw, rgb
PIPE_FORMAT_R8_SSCALED , plain, 1, 1, 1, s8 , , , , x001, rgb
PIPE_FORMAT_R8G8_SSCALED , plain, 1, 1, 1, s8 , s8 , , , xy01, rgb
PIPE_FORMAT_R8G8B8_SSCALED , plain, 1, 1, 1, s8 , s8 , s8 , , xyz1, rgb
+PIPE_FORMAT_B8G8R8_SSCALED , plain, 1, 1, 1, s8 , s8 , s8 , , zyx1, rgb
PIPE_FORMAT_R8G8B8A8_SSCALED , plain, 1, 1, 1, s8 , s8 , s8 , s8 , xyzw, rgb
+PIPE_FORMAT_B8G8R8A8_SSCALED , plain, 1, 1, 1, s8 , s8 , s8 , s8 , zyxw, rgb
+PIPE_FORMAT_A8B8G8R8_SSCALED , plain, 1, 1, 1, s8 , s8 , s8 , s8 , wzyx, rgb
# GL-specific vertex buffer element formats
# A.k.a. GL_FIXED
PIPE_FORMAT_L32_SINT , plain, 1, 1, 1, sp32, , , , xxx1, rgb
PIPE_FORMAT_L32A32_SINT , plain, 1, 1, 1, sp32, sp32, , , xxxy, rgb
+PIPE_FORMAT_B8G8R8_UINT , plain, 1, 1, 1, up8 , up8 , up8 , , zyx1, rgb
PIPE_FORMAT_B8G8R8A8_UINT , plain, 1, 1, 1, up8 , up8 , up8 , up8 , zyxw, rgb
+
+PIPE_FORMAT_B8G8R8_SINT , plain, 1, 1, 1, sp8 , sp8 , sp8 , , zyx1, rgb
+PIPE_FORMAT_B8G8R8A8_SINT , plain, 1, 1, 1, sp8 , sp8 , sp8 , sp8 , zyxw, rgb
+
PIPE_FORMAT_A8R8G8B8_UINT , plain, 1, 1, 1, up8 , up8 , up8 , up8 , yzwx, rgb
PIPE_FORMAT_A8B8G8R8_UINT , plain, 1, 1, 1, up8 , up8 , up8 , up8 , wzyx, rgb
PIPE_FORMAT_A2R10G10B10_UINT , plain, 1, 1, 1, up2 , up10, up10, up10, yzwx, rgb, up10, up10, up10, up2 , zyxw
PIPE_FORMAT_A2B10G10R10_UINT , plain, 1, 1, 1, up2 , up10, up10, up10, wzyx, rgb, up10, up10, up10, up2 , xyzw
PIPE_FORMAT_B10G10R10A2_UINT , plain, 1, 1, 1, up10, up10, up10, up2, zyxw, rgb, up2 , up10, up10, up10, yzwx
+PIPE_FORMAT_B10G10R10A2_SINT , plain, 1, 1, 1, sp10, sp10, sp10, sp2, zyxw, rgb, sp2 , sp10, sp10, sp10, yzwx
PIPE_FORMAT_R5G6B5_UINT , plain, 1, 1, 1, up5 , up6 , up5 , , xyz1, rgb, up5 , up6 , up5 , , zyx1
PIPE_FORMAT_B5G6R5_UINT , plain, 1, 1, 1, up5 , up6 , up5 , , zyx1, rgb, up5 , up6 , up5 , , xyz1
PIPE_FORMAT_R3G3B2_UINT , plain, 1, 1, 1, up3 , up3 , up2 , , xyz1, rgb, up3 , up3 , up2 , , zyx1
PIPE_FORMAT_R32A32_UINT , plain, 1, 1, 1, up32 , up32 , , , x00y, rgb
PIPE_FORMAT_R32A32_SINT , plain, 1, 1, 1, sp32 , sp32 , , , x00y, rgb
PIPE_FORMAT_R10G10B10A2_UINT , plain, 1, 1, 1, up10 , up10 , up10, up2 , xyzw, rgb, up2 , up10, up10, up10, wzyx
+PIPE_FORMAT_R10G10B10A2_SINT , plain, 1, 1, 1, sp10 , sp10 , sp10, sp2 , xyzw, rgb, sp2 , sp10, sp10, sp10, wzyx
PIPE_FORMAT_B5G6R5_SRGB , plain, 1, 1, 1, un5 , un6 , un5 , , zyx1, srgb, un5 , un6 , un5 , , xyz1
*/
static const enum pipe_format vk_format_map[] = {
/* Missing R4G4 */
+ [VK_FORMAT_R4G4B4A4_UNORM_PACK16] = PIPE_FORMAT_A4B4G4R4_UNORM,
+ [VK_FORMAT_B4G4R4A4_UNORM_PACK16] = PIPE_FORMAT_A4R4G4B4_UNORM,
[VK_FORMAT_R5G6B5_UNORM_PACK16] = PIPE_FORMAT_B5G6R5_UNORM,
[VK_FORMAT_B5G6R5_UNORM_PACK16] = PIPE_FORMAT_R5G6B5_UNORM,
[VK_FORMAT_R5G5B5A1_UNORM_PACK16] = PIPE_FORMAT_A1B5G5R5_UNORM,
[VK_FORMAT_R8G8_SSCALED] = PIPE_FORMAT_R8G8_SSCALED,
[VK_FORMAT_R8G8_UINT] = PIPE_FORMAT_R8G8_UINT,
[VK_FORMAT_R8G8_SINT] = PIPE_FORMAT_R8G8_SINT,
- /* Missing R8G8_SRGB */
+ [VK_FORMAT_R8G8_SRGB] = PIPE_FORMAT_R8G8_SRGB,
[VK_FORMAT_R8G8B8_UNORM] = PIPE_FORMAT_R8G8B8_UNORM,
[VK_FORMAT_R8G8B8_SNORM] = PIPE_FORMAT_R8G8B8_SNORM,
[VK_FORMAT_R8G8B8_SINT] = PIPE_FORMAT_R8G8B8_SINT,
[VK_FORMAT_R8G8B8_SRGB] = PIPE_FORMAT_R8G8B8_SRGB,
- /* Mostly no B8G8R8_* */
[VK_FORMAT_B8G8R8_UNORM] = PIPE_FORMAT_B8G8R8_UNORM,
+ [VK_FORMAT_B8G8R8_SNORM] = PIPE_FORMAT_B8G8R8_SNORM,
+ [VK_FORMAT_B8G8R8_USCALED] = PIPE_FORMAT_B8G8R8_USCALED,
+ [VK_FORMAT_B8G8R8_SSCALED] = PIPE_FORMAT_B8G8R8_SSCALED,
+ [VK_FORMAT_B8G8R8_UINT] = PIPE_FORMAT_B8G8R8_UINT,
+ [VK_FORMAT_B8G8R8_SINT] = PIPE_FORMAT_B8G8R8_SINT,
+ [VK_FORMAT_B8G8R8_SRGB] = PIPE_FORMAT_B8G8R8_SRGB,
[VK_FORMAT_R8G8B8A8_UNORM] = PIPE_FORMAT_R8G8B8A8_UNORM,
[VK_FORMAT_R8G8B8A8_SNORM] = PIPE_FORMAT_R8G8B8A8_SNORM,
[VK_FORMAT_R8G8B8A8_SINT] = PIPE_FORMAT_R8G8B8A8_SINT,
[VK_FORMAT_R8G8B8A8_SRGB] = PIPE_FORMAT_R8G8B8A8_SRGB,
- /* Mostly no B8G8R8A8_* */
[VK_FORMAT_B8G8R8A8_UNORM] = PIPE_FORMAT_B8G8R8A8_UNORM,
+ [VK_FORMAT_B8G8R8A8_SNORM] = PIPE_FORMAT_B8G8R8A8_SNORM,
+ [VK_FORMAT_B8G8R8A8_USCALED] = PIPE_FORMAT_B8G8R8A8_USCALED,
+ [VK_FORMAT_B8G8R8A8_SSCALED] = PIPE_FORMAT_B8G8R8A8_SSCALED,
[VK_FORMAT_B8G8R8A8_UINT] = PIPE_FORMAT_B8G8R8A8_UINT,
+ [VK_FORMAT_B8G8R8A8_SINT] = PIPE_FORMAT_B8G8R8A8_SINT,
[VK_FORMAT_B8G8R8A8_SRGB] = PIPE_FORMAT_B8G8R8A8_SRGB,
[VK_FORMAT_A8B8G8R8_UNORM_PACK32] = PIPE_FORMAT_RGBA8888_UNORM,
+ [VK_FORMAT_A8B8G8R8_SNORM_PACK32] = PIPE_FORMAT_RGBA8888_SNORM,
+ [VK_FORMAT_A8B8G8R8_USCALED_PACK32] = PIPE_FORMAT_RGBA8888_USCALED,
+ [VK_FORMAT_A8B8G8R8_SSCALED_PACK32] = PIPE_FORMAT_RGBA8888_SSCALED,
[VK_FORMAT_A8B8G8R8_UINT_PACK32] = PIPE_FORMAT_RGBA8888_UINT,
+ [VK_FORMAT_A8B8G8R8_SINT_PACK32] = PIPE_FORMAT_RGBA8888_SINT,
[VK_FORMAT_A8B8G8R8_SRGB_PACK32] = PIPE_FORMAT_RGBA8888_SRGB,
[VK_FORMAT_A2R10G10B10_UNORM_PACK32] = PIPE_FORMAT_B10G10R10A2_UNORM,
[VK_FORMAT_A2R10G10B10_USCALED_PACK32] = PIPE_FORMAT_B10G10R10A2_USCALED,
[VK_FORMAT_A2R10G10B10_SSCALED_PACK32] = PIPE_FORMAT_B10G10R10A2_SSCALED,
[VK_FORMAT_A2R10G10B10_UINT_PACK32] = PIPE_FORMAT_B10G10R10A2_UINT,
- /* Missing 2101010_SINT */
+ [VK_FORMAT_A2R10G10B10_SINT_PACK32] = PIPE_FORMAT_B10G10R10A2_SINT,
+
+ [VK_FORMAT_A2B10G10R10_UNORM_PACK32] = PIPE_FORMAT_R10G10B10A2_UNORM,
+ [VK_FORMAT_A2B10G10R10_SNORM_PACK32] = PIPE_FORMAT_R10G10B10A2_SNORM,
+ [VK_FORMAT_A2B10G10R10_USCALED_PACK32] = PIPE_FORMAT_R10G10B10A2_USCALED,
+ [VK_FORMAT_A2B10G10R10_SSCALED_PACK32] = PIPE_FORMAT_R10G10B10A2_SSCALED,
+ [VK_FORMAT_A2B10G10R10_UINT_PACK32] = PIPE_FORMAT_R10G10B10A2_UINT,
+ [VK_FORMAT_A2B10G10R10_SINT_PACK32] = PIPE_FORMAT_R10G10B10A2_SINT,
[VK_FORMAT_R16_UNORM] = PIPE_FORMAT_R16_UNORM,
[VK_FORMAT_R16_SNORM] = PIPE_FORMAT_R16_SNORM,
[VK_FORMAT_ASTC_10x6_SRGB_BLOCK] = PIPE_FORMAT_ASTC_10x6_SRGB,
[VK_FORMAT_ASTC_10x8_UNORM_BLOCK] = PIPE_FORMAT_ASTC_10x8,
[VK_FORMAT_ASTC_10x8_SRGB_BLOCK] = PIPE_FORMAT_ASTC_10x8_SRGB,
+ [VK_FORMAT_ASTC_10x10_UNORM_BLOCK] = PIPE_FORMAT_ASTC_10x10,
+ [VK_FORMAT_ASTC_10x10_SRGB_BLOCK] = PIPE_FORMAT_ASTC_10x10_SRGB,
[VK_FORMAT_ASTC_12x10_UNORM_BLOCK] = PIPE_FORMAT_ASTC_12x10,
[VK_FORMAT_ASTC_12x10_SRGB_BLOCK] = PIPE_FORMAT_ASTC_12x10_SRGB,
[VK_FORMAT_ASTC_12x12_UNORM_BLOCK] = PIPE_FORMAT_ASTC_12x12,