summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_format.csv198
-rw-r--r--src/gallium/auxiliary/util/u_format.h13
-rwxr-xr-xsrc/gallium/auxiliary/util/u_format_table.py12
3 files changed, 114 insertions, 109 deletions
diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index ab56b29a13..74bd21a838 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -1,99 +1,99 @@
-PIPE_FORMAT_A8R8G8B8_UNORM , rgba, 1, 1, un8 , un8 , un8 , un8 , zyxw,
-PIPE_FORMAT_X8R8G8B8_UNORM , rgba, 1, 1, un8 , un8 , un8 , un8 , zyx1,
-PIPE_FORMAT_B8G8R8A8_UNORM , rgba, 1, 1, un8 , un8 , un8 , un8 , xyzw,
-PIPE_FORMAT_B8G8R8X8_UNORM , rgba, 1, 1, un8 , un8 , un8 , un8 , xyz1,
-PIPE_FORMAT_A1R5G5B5_UNORM , rgba, 1, 1, un5 , un5 , un5 , un1 , zyxw,
-PIPE_FORMAT_A4R4G4B4_UNORM , rgba, 1, 1, un4 , un4 , un4 , un4 , zyxw,
-PIPE_FORMAT_R5G6B5_UNORM , rgba, 1, 1, un5 , un6 , un5 , , zyx1,
-PIPE_FORMAT_A2B10G10R10_UNORM , rgba, 1, 1, un10, un10, un10, un2 , wzyx,
-PIPE_FORMAT_L8_UNORM , rgba, 1, 1, un8 , , , , xxx1,
-PIPE_FORMAT_A8_UNORM , rgba, 1, 1, un8 , , , , 000x,
-PIPE_FORMAT_I8_UNORM , rgba, 1, 1, un8 , , , , xxxx,
-PIPE_FORMAT_A8L8_UNORM , rgba, 1, 1, un8 , un8 , , , xxxy,
-PIPE_FORMAT_L16_UNORM , rgba, 1, 1, un16, , , , xxx1,
-PIPE_FORMAT_Z16_UNORM , zs , 1, 1, un16, , , , x0__,
-PIPE_FORMAT_Z32_UNORM , zs , 1, 1, un32, , , , x0__,
-PIPE_FORMAT_Z32_FLOAT , zs , 1, 1, f32 , , , , x0__,
-PIPE_FORMAT_S8Z24_UNORM , zs , 1, 1, un8 , un24, , , yx__,
-PIPE_FORMAT_Z24S8_UNORM , zs , 1, 1, un24, un8 , , , xy__,
-PIPE_FORMAT_X8Z24_UNORM , zs , 1, 1, un8 , un24, , , y0__,
-PIPE_FORMAT_Z24X8_UNORM , zs , 1, 1, un24, un8 , , , x0__,
-PIPE_FORMAT_S8_UNORM , zs , 1, 1, un8 , , , , 0x__,
-PIPE_FORMAT_R64_FLOAT , rgba, 1, 1, f64 , , , , x001,
-PIPE_FORMAT_R64G64_FLOAT , rgba, 1, 1, f64 , f64 , , , xy01,
-PIPE_FORMAT_R64G64B64_FLOAT , rgba, 1, 1, f64 , f64 , f64 , , xyz1,
-PIPE_FORMAT_R64G64B64A64_FLOAT , rgba, 1, 1, f64 , f64 , f64 , f64 , xyzw,
-PIPE_FORMAT_R32_FLOAT , rgba, 1, 1, f32 , , , , x001,
-PIPE_FORMAT_R32G32_FLOAT , rgba, 1, 1, f32 , f32 , , , xy01,
-PIPE_FORMAT_R32G32B32_FLOAT , rgba, 1, 1, f32 , f32 , f32 , , xyz1,
-PIPE_FORMAT_R32G32B32A32_FLOAT , rgba, 1, 1, f32 , f32 , f32 , f32 , xyzw,
-PIPE_FORMAT_R32_UNORM , rgba, 1, 1, un32, , , , x001,
-PIPE_FORMAT_R32G32_UNORM , rgba, 1, 1, un32, un32, , , xy01,
-PIPE_FORMAT_R32G32B32_UNORM , rgba, 1, 1, un32, un32, un32, , xyz1,
-PIPE_FORMAT_R32G32B32A32_UNORM , rgba, 1, 1, un32, un32, un32, un32, xyzw,
-PIPE_FORMAT_R32_USCALED , rgba, 1, 1, u32 , , , , x001,
-PIPE_FORMAT_R32G32_USCALED , rgba, 1, 1, u32 , u32 , , , xy01,
-PIPE_FORMAT_R32G32B32_USCALED , rgba, 1, 1, u32 , u32 , u32 , , xyz1,
-PIPE_FORMAT_R32G32B32A32_USCALED , rgba, 1, 1, u32 , u32 , u32 , u32 , xyzw,
-PIPE_FORMAT_R32_SNORM , rgba, 1, 1, sn32, , , , x001,
-PIPE_FORMAT_R32G32_SNORM , rgba, 1, 1, sn32, sn32, , , xy01,
-PIPE_FORMAT_R32G32B32_SNORM , rgba, 1, 1, sn32, sn32, sn32, , xyz1,
-PIPE_FORMAT_R32G32B32A32_SNORM , rgba, 1, 1, sn32, sn32, sn32, sn32, xyzw,
-PIPE_FORMAT_R32_SSCALED , rgba, 1, 1, s32 , , , , x001,
-PIPE_FORMAT_R32G32_SSCALED , rgba, 1, 1, s32 , s32 , , , xy01,
-PIPE_FORMAT_R32G32B32_SSCALED , rgba, 1, 1, s32 , s32 , s32 , , xyz1,
-PIPE_FORMAT_R32G32B32A32_SSCALED , rgba, 1, 1, s32 , s32 , s32 , s32 , xyzw,
-PIPE_FORMAT_R16_UNORM , rgba, 1, 1, un16, , , , x001,
-PIPE_FORMAT_R16G16_UNORM , rgba, 1, 1, un16, un16, , , xy01,
-PIPE_FORMAT_R16G16B16_UNORM , rgba, 1, 1, un16, un16, un16, , xyz1,
-PIPE_FORMAT_R16G16B16A16_UNORM , rgba, 1, 1, un16, un16, un16, un16, xyzw,
-PIPE_FORMAT_R16_USCALED , rgba, 1, 1, u16 , , , , x001,
-PIPE_FORMAT_R16G16_USCALED , rgba, 1, 1, u16 , u16 , , , xy01,
-PIPE_FORMAT_R16G16B16_USCALED , rgba, 1, 1, u16 , u16 , u16 , , xyz1,
-PIPE_FORMAT_R16G16B16A16_USCALED , rgba, 1, 1, u16 , u16 , u16 , u16 , xyzw,
-PIPE_FORMAT_R16_SNORM , rgba, 1, 1, sn16, , , , x001,
-PIPE_FORMAT_R16G16_SNORM , rgba, 1, 1, sn16, sn16, , , xy01,
-PIPE_FORMAT_R16G16B16_SNORM , rgba, 1, 1, sn16, sn16, sn16, , xyz1,
-PIPE_FORMAT_R16G16B16A16_SNORM , rgba, 1, 1, sn16, sn16, sn16, sn16, xyzw,
-PIPE_FORMAT_R16_SSCALED , rgba, 1, 1, s16 , , , , x001,
-PIPE_FORMAT_R16G16_SSCALED , rgba, 1, 1, s16 , s16 , , , xy01,
-PIPE_FORMAT_R16G16B16_SSCALED , rgba, 1, 1, s16 , s16 , s16 , , xyz1,
-PIPE_FORMAT_R16G16B16A16_SSCALED , rgba, 1, 1, s16 , s16 , s16 , s16 , xyzw,
-PIPE_FORMAT_R8_UNORM , rgba, 1, 1, un8 , , , , x001,
-PIPE_FORMAT_R8G8_UNORM , rgba, 1, 1, un8 , un8 , , , xy01,
-PIPE_FORMAT_R8G8B8_UNORM , rgba, 1, 1, un8 , un8 , un8 , , xyz1,
-PIPE_FORMAT_R8G8B8A8_UNORM , rgba, 1, 1, un8 , un8 , un8 , un8 , xyzw,
-PIPE_FORMAT_R8G8B8X8_UNORM , rgba, 1, 1, un8 , un8 , un8 , un8 , xyz1,
-PIPE_FORMAT_R8_USCALED , rgba, 1, 1, u8 , , , , x001,
-PIPE_FORMAT_R8G8_USCALED , rgba, 1, 1, u8 , u8 , , , xy01,
-PIPE_FORMAT_R8G8B8_USCALED , rgba, 1, 1, u8 , u8 , u8 , , xyz1,
-PIPE_FORMAT_R8G8B8A8_USCALED , rgba, 1, 1, u8 , u8 , u8 , u8 , xyzw,
-PIPE_FORMAT_R8G8B8X8_USCALED , rgba, 1, 1, u8 , u8 , u8 , u8 , xyz1,
-PIPE_FORMAT_R8_SNORM , rgba, 1, 1, sn8 , , , , x001,
-PIPE_FORMAT_R8G8_SNORM , rgba, 1, 1, sn8 , sn8 , , , xy01,
-PIPE_FORMAT_R8G8B8_SNORM , rgba, 1, 1, sn8 , sn8 , sn8 , , xyz1,
-PIPE_FORMAT_R8G8B8A8_SNORM , rgba, 1, 1, sn8 , sn8 , sn8 , sn8 , xyzw,
-PIPE_FORMAT_R8G8B8X8_SNORM , rgba, 1, 1, sn8 , sn8 , sn8 , sn8 , xyz1,
-PIPE_FORMAT_B6G5R5_SNORM , rgba, 1, 1, sn5 , sn5 , sn6 , , zyx1,
-PIPE_FORMAT_A8B8G8R8_SNORM , rgba, 1, 1, sn8 , sn8 , sn8 , sn8 , zyxw,
-PIPE_FORMAT_X8B8G8R8_SNORM , rgba, 1, 1, sn8 , sn8 , sn8 , sn8 , zyx1,
-PIPE_FORMAT_R8_SSCALED , rgba, 1, 1, s8 , , , , x001,
-PIPE_FORMAT_R8G8_SSCALED , rgba, 1, 1, s8 , s8 , , , xy01,
-PIPE_FORMAT_R8G8B8_SSCALED , rgba, 1, 1, s8 , s8 , s8 , , xyz1,
-PIPE_FORMAT_R8G8B8A8_SSCALED , rgba, 1, 1, s8 , s8 , s8 , s8 , xyzw,
-PIPE_FORMAT_R8G8B8X8_SSCALED , rgba, 1, 1, s8 , s8 , s8 , s8 , xyz1,
-PIPE_FORMAT_R32_FIXED , rgba, 1, 1, h32 , , , , x001,
-PIPE_FORMAT_R32G32_FIXED , rgba, 1, 1, h32 , h32 , , , xy01,
-PIPE_FORMAT_R32G32B32_FIXED , rgba, 1, 1, h32 , h32 , h32 , , xyz1,
-PIPE_FORMAT_R32G32B32A32_FIXED , rgba, 1, 1, h32 , h32 , h32 , h32 , xyzw,
-PIPE_FORMAT_L8_SRGB , rgba, 1, 1, u8 , , , , xxx1, srgb
-PIPE_FORMAT_A8L8_SRGB , rgba, 1, 1, u8 , u8 , , , xxxy, srgb
-PIPE_FORMAT_R8G8B8_SRGB , rgba, 1, 1, u8 , u8 , u8 , , xyz1, srgb
-PIPE_FORMAT_R8G8B8A8_SRGB , rgba, 1, 1, u8 , u8 , u8 , u8 , xyzw, srgb
-PIPE_FORMAT_R8G8B8X8_SRGB , rgba, 1, 1, u8 , u8 , u8 , u8 , xyz1, srgb
-PIPE_FORMAT_A8R8G8B8_SRGB , rgba, 1, 1, u8 , u8 , u8 , u8 , wxyz, srgb
-PIPE_FORMAT_X8R8G8B8_SRGB , rgba, 1, 1, u8 , u8 , u8 , u8 , 1xyz, srgb
-PIPE_FORMAT_B8G8R8A8_SRGB , rgba, 1, 1, u8 , u8 , u8 , u8 , zyxw, srgb
-PIPE_FORMAT_B8G8R8X8_SRGB , rgba, 1, 1, u8 , u8 , u8 , u8 , zyx1, srgb
-PIPE_FORMAT_X8UB8UG8SR8S_NORM , rgba, 1, 1, sn8 , sn8 , un8 , x8 , 1zyx,
-PIPE_FORMAT_B6UG5SR5S_NORM , rgba, 1, 1, sn5 , sn5 , un6 , , xyz1,
+PIPE_FORMAT_A8R8G8B8_UNORM , arith , 1, 1, un8 , un8 , un8 , un8 , zyxw, rgb
+PIPE_FORMAT_X8R8G8B8_UNORM , arith , 1, 1, un8 , un8 , un8 , un8 , zyx1, rgb
+PIPE_FORMAT_B8G8R8A8_UNORM , arith , 1, 1, un8 , un8 , un8 , un8 , yzwx, rgb
+PIPE_FORMAT_B8G8R8X8_UNORM , arith , 1, 1, un8 , un8 , un8 , un8 , yzw1, rgb
+PIPE_FORMAT_A1R5G5B5_UNORM , arith , 1, 1, un5 , un5 , un5 , un1 , zyxw, rgb
+PIPE_FORMAT_A4R4G4B4_UNORM , arith , 1, 1, un4 , un4 , un4 , un4 , zyxw, rgb
+PIPE_FORMAT_R5G6B5_UNORM , arith , 1, 1, un5 , un6 , un5 , , zyx1, rgb
+PIPE_FORMAT_A2B10G10R10_UNORM , arith , 1, 1, un10, un10, un10, un2 , wzyx, rgb
+PIPE_FORMAT_L8_UNORM , arith , 1, 1, un8 , , , , xxx1, rgb
+PIPE_FORMAT_A8_UNORM , arith , 1, 1, un8 , , , , 000x, rgb
+PIPE_FORMAT_I8_UNORM , arith , 1, 1, un8 , , , , xxxx, rgb
+PIPE_FORMAT_A8L8_UNORM , arith , 1, 1, un8 , un8 , , , xxxy, rgb
+PIPE_FORMAT_L16_UNORM , arith , 1, 1, un16, , , , xxx1, rgb
+PIPE_FORMAT_Z16_UNORM , arith , 1, 1, un16, , , , x0__, zs
+PIPE_FORMAT_Z32_UNORM , arith , 1, 1, un32, , , , x0__, zs
+PIPE_FORMAT_Z32_FLOAT , arith , 1, 1, f32 , , , , x0__, zs
+PIPE_FORMAT_S8Z24_UNORM , arith , 1, 1, un8 , un24, , , yx__, zs
+PIPE_FORMAT_Z24S8_UNORM , arith , 1, 1, un24, un8 , , , xy__, zs
+PIPE_FORMAT_X8Z24_UNORM , arith , 1, 1, un8 , un24, , , y0__, zs
+PIPE_FORMAT_Z24X8_UNORM , arith , 1, 1, un24, un8 , , , x0__, zs
+PIPE_FORMAT_S8_UNORM , arith , 1, 1, un8 , , , , 0x__, zs
+PIPE_FORMAT_R64_FLOAT , array , 1, 1, f64 , , , , x001, rgb
+PIPE_FORMAT_R64G64_FLOAT , array , 1, 1, f64 , f64 , , , xy01, rgb
+PIPE_FORMAT_R64G64B64_FLOAT , array , 1, 1, f64 , f64 , f64 , , xyz1, rgb
+PIPE_FORMAT_R64G64B64A64_FLOAT , array , 1, 1, f64 , f64 , f64 , f64 , xyzw, rgb
+PIPE_FORMAT_R32_FLOAT , array , 1, 1, f32 , , , , x001, rgb
+PIPE_FORMAT_R32G32_FLOAT , array , 1, 1, f32 , f32 , , , xy01, rgb
+PIPE_FORMAT_R32G32B32_FLOAT , array , 1, 1, f32 , f32 , f32 , , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_FLOAT , array , 1, 1, f32 , f32 , f32 , f32 , xyzw, rgb
+PIPE_FORMAT_R32_UNORM , array , 1, 1, un32, , , , x001, rgb
+PIPE_FORMAT_R32G32_UNORM , array , 1, 1, un32, un32, , , xy01, rgb
+PIPE_FORMAT_R32G32B32_UNORM , array , 1, 1, un32, un32, un32, , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_UNORM , array , 1, 1, un32, un32, un32, un32, xyzw, rgb
+PIPE_FORMAT_R32_USCALED , array , 1, 1, u32 , , , , x001, rgb
+PIPE_FORMAT_R32G32_USCALED , array , 1, 1, u32 , u32 , , , xy01, rgb
+PIPE_FORMAT_R32G32B32_USCALED , array , 1, 1, u32 , u32 , u32 , , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_USCALED , array , 1, 1, u32 , u32 , u32 , u32 , xyzw, rgb
+PIPE_FORMAT_R32_SNORM , array , 1, 1, sn32, , , , x001, rgb
+PIPE_FORMAT_R32G32_SNORM , array , 1, 1, sn32, sn32, , , xy01, rgb
+PIPE_FORMAT_R32G32B32_SNORM , array , 1, 1, sn32, sn32, sn32, , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_SNORM , array , 1, 1, sn32, sn32, sn32, sn32, xyzw, rgb
+PIPE_FORMAT_R32_SSCALED , array , 1, 1, s32 , , , , x001, rgb
+PIPE_FORMAT_R32G32_SSCALED , array , 1, 1, s32 , s32 , , , xy01, rgb
+PIPE_FORMAT_R32G32B32_SSCALED , array , 1, 1, s32 , s32 , s32 , , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_SSCALED , array , 1, 1, s32 , s32 , s32 , s32 , xyzw, rgb
+PIPE_FORMAT_R16_UNORM , array , 1, 1, un16, , , , x001, rgb
+PIPE_FORMAT_R16G16_UNORM , array , 1, 1, un16, un16, , , xy01, rgb
+PIPE_FORMAT_R16G16B16_UNORM , array , 1, 1, un16, un16, un16, , xyz1, rgb
+PIPE_FORMAT_R16G16B16A16_UNORM , array , 1, 1, un16, un16, un16, un16, xyzw, rgb
+PIPE_FORMAT_R16_USCALED , array , 1, 1, u16 , , , , x001, rgb
+PIPE_FORMAT_R16G16_USCALED , array , 1, 1, u16 , u16 , , , xy01, rgb
+PIPE_FORMAT_R16G16B16_USCALED , array , 1, 1, u16 , u16 , u16 , , xyz1, rgb
+PIPE_FORMAT_R16G16B16A16_USCALED , array , 1, 1, u16 , u16 , u16 , u16 , xyzw, rgb
+PIPE_FORMAT_R16_SNORM , array , 1, 1, sn16, , , , x001, rgb
+PIPE_FORMAT_R16G16_SNORM , array , 1, 1, sn16, sn16, , , xy01, rgb
+PIPE_FORMAT_R16G16B16_SNORM , array , 1, 1, sn16, sn16, sn16, , xyz1, rgb
+PIPE_FORMAT_R16G16B16A16_SNORM , array , 1, 1, sn16, sn16, sn16, sn16, xyzw, rgb
+PIPE_FORMAT_R16_SSCALED , array , 1, 1, s16 , , , , x001, rgb
+PIPE_FORMAT_R16G16_SSCALED , array , 1, 1, s16 , s16 , , , xy01, rgb
+PIPE_FORMAT_R16G16B16_SSCALED , array , 1, 1, s16 , s16 , s16 , , xyz1, rgb
+PIPE_FORMAT_R16G16B16A16_SSCALED , array , 1, 1, s16 , s16 , s16 , s16 , xyzw, rgb
+PIPE_FORMAT_R8_UNORM , array , 1, 1, un8 , , , , x001, rgb
+PIPE_FORMAT_R8G8_UNORM , array , 1, 1, un8 , un8 , , , xy01, rgb
+PIPE_FORMAT_R8G8B8_UNORM , array , 1, 1, un8 , un8 , un8 , , xyz1, rgb
+PIPE_FORMAT_R8G8B8A8_UNORM , array , 1, 1, un8 , un8 , un8 , un8 , xyzw, rgb
+PIPE_FORMAT_R8G8B8X8_UNORM , array , 1, 1, un8 , un8 , un8 , un8 , xyz1, rgb
+PIPE_FORMAT_R8_USCALED , array , 1, 1, u8 , , , , x001, rgb
+PIPE_FORMAT_R8G8_USCALED , array , 1, 1, u8 , u8 , , , xy01, rgb
+PIPE_FORMAT_R8G8B8_USCALED , array , 1, 1, u8 , u8 , u8 , , xyz1, rgb
+PIPE_FORMAT_R8G8B8A8_USCALED , array , 1, 1, u8 , u8 , u8 , u8 , xyzw, rgb
+PIPE_FORMAT_R8G8B8X8_USCALED , array , 1, 1, u8 , u8 , u8 , u8 , xyz1, rgb
+PIPE_FORMAT_R8_SNORM , array , 1, 1, sn8 , , , , x001, rgb
+PIPE_FORMAT_R8G8_SNORM , array , 1, 1, sn8 , sn8 , , , xy01, rgb
+PIPE_FORMAT_R8G8B8_SNORM , array , 1, 1, sn8 , sn8 , sn8 , , xyz1, rgb
+PIPE_FORMAT_R8G8B8A8_SNORM , array , 1, 1, sn8 , sn8 , sn8 , sn8 , xyzw, rgb
+PIPE_FORMAT_R8G8B8X8_SNORM , array , 1, 1, sn8 , sn8 , sn8 , sn8 , xyz1, rgb
+PIPE_FORMAT_B6G5R5_SNORM , arith , 1, 1, sn5 , sn5 , sn6 , , zyx1, rgb
+PIPE_FORMAT_A8B8G8R8_SNORM , arith , 1, 1, sn8 , sn8 , sn8 , sn8 , zyxw, rgb
+PIPE_FORMAT_X8B8G8R8_SNORM , arith , 1, 1, sn8 , sn8 , sn8 , sn8 , zyx1, rgb
+PIPE_FORMAT_R8_SSCALED , array , 1, 1, s8 , , , , x001, rgb
+PIPE_FORMAT_R8G8_SSCALED , array , 1, 1, s8 , s8 , , , xy01, rgb
+PIPE_FORMAT_R8G8B8_SSCALED , array , 1, 1, s8 , s8 , s8 , , xyz1, rgb
+PIPE_FORMAT_R8G8B8A8_SSCALED , array , 1, 1, s8 , s8 , s8 , s8 , xyzw, rgb
+PIPE_FORMAT_R8G8B8X8_SSCALED , array , 1, 1, s8 , s8 , s8 , s8 , xyz1, rgb
+PIPE_FORMAT_R32_FIXED , array , 1, 1, h32 , , , , x001, rgb
+PIPE_FORMAT_R32G32_FIXED , array , 1, 1, h32 , h32 , , , xy01, rgb
+PIPE_FORMAT_R32G32B32_FIXED , array , 1, 1, h32 , h32 , h32 , , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_FIXED , array , 1, 1, h32 , h32 , h32 , h32 , xyzw, rgb
+PIPE_FORMAT_L8_SRGB , arith , 1, 1, u8 , , , , xxx1, srgb
+PIPE_FORMAT_A8L8_SRGB , arith , 1, 1, u8 , u8 , , , xxxy, srgb
+PIPE_FORMAT_R8G8B8_SRGB , arith , 1, 1, u8 , u8 , u8 , , xyz1, srgb
+PIPE_FORMAT_R8G8B8A8_SRGB , arith , 1, 1, u8 , u8 , u8 , u8 , xyzw, srgb
+PIPE_FORMAT_R8G8B8X8_SRGB , arith , 1, 1, u8 , u8 , u8 , u8 , xyz1, srgb
+PIPE_FORMAT_A8R8G8B8_SRGB , arith , 1, 1, u8 , u8 , u8 , u8 , wxyz, srgb
+PIPE_FORMAT_X8R8G8B8_SRGB , arith , 1, 1, u8 , u8 , u8 , u8 , 1xyz, srgb
+PIPE_FORMAT_B8G8R8A8_SRGB , arith , 1, 1, u8 , u8 , u8 , u8 , zyxw, srgb
+PIPE_FORMAT_B8G8R8X8_SRGB , arith , 1, 1, u8 , u8 , u8 , u8 , zyx1, srgb
+PIPE_FORMAT_X8UB8UG8SR8S_NORM , arith , 1, 1, sn8 , sn8 , un8 , x8 , 1zyx, rgb
+PIPE_FORMAT_B6UG5SR5S_NORM , arith , 1, 1, sn5 , sn5 , un6 , , xyz1, rgb
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index 2d7730fbc5..b5504ebe05 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -34,10 +34,11 @@
enum util_format_layout {
- UTIL_FORMAT_LAYOUT_RGBA = 0,
- UTIL_FORMAT_LAYOUT_ZS = 1,
- UTIL_FORMAT_LAYOUT_YUV = 2,
- UTIL_FORMAT_LAYOUT_DXT = 3
+ UTIL_FORMAT_LAYOUT_SCALAR = 0,
+ UTIL_FORMAT_LAYOUT_ARITH = 1,
+ UTIL_FORMAT_LAYOUT_ARRAY = 2,
+ UTIL_FORMAT_LAYOUT_YUV = 3,
+ UTIL_FORMAT_LAYOUT_DXT = 4
};
@@ -76,7 +77,9 @@ enum util_format_swizzle {
enum util_format_colorspace {
UTIL_FORMAT_COLORSPACE_RGB = 0,
- UTIL_FORMAT_COLORSPACE_SRGB = 1
+ UTIL_FORMAT_COLORSPACE_SRGB = 1,
+ UTIL_FORMAT_COLORSPACE_YUV = 2,
+ UTIL_FORMAT_COLORSPACE_ZS = 3,
};
diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py
index e94fbbecb3..c536e39171 100755
--- a/src/gallium/auxiliary/util/u_format_table.py
+++ b/src/gallium/auxiliary/util/u_format_table.py
@@ -51,9 +51,6 @@ class Type:
return s
-SCALED, NORM, SRGB = 'scaled', 'norm', 'srgb'
-
-
class Format:
def __init__(self, name, layout, block_width, block_height, in_types, out_swizzle, colorspace):
@@ -111,7 +108,12 @@ def layout_map(layout):
return 'UTIL_FORMAT_LAYOUT_' + str(layout).upper()
-layout_channels_map = {
+def colorspace_map(colorspace):
+ return 'UTIL_FORMAT_COLORSPACE_' + str(colorspace).upper()
+
+
+colorspace_channels_map = {
+ 'rgb': 'rgba',
'rgba': 'rgba',
'zs': 'zs',
'yuv': ['y1', 'y2', 'u', 'v'],
@@ -186,7 +188,7 @@ def write_format_table(formats):
comment = 'ignored'
print " %s%s /* %s */" % (swizzle_map[swizzle], sep, comment)
print " },"
- print " UTIL_FORMAT_COLORSPACE_RGB,"
+ print " %s," % (colorspace_map(format.colorspace),)
print " },"
print " {"
print " PIPE_FORMAT_NONE,"