summaryrefslogtreecommitdiffstats
path: root/src/util/format
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2019-12-19 12:35:40 -0500
committerJonathan Marek <[email protected]>2019-12-19 19:03:02 -0500
commit54f72c83d6d10899e4af37deb0eaba1f122336a4 (patch)
tree7a37fed82dac45df08f049dd45ac8a68d4cc7df9 /src/util/format
parentb9d4c10e4b26b6bb6bd1365d3fc8b3c6288c8da7 (diff)
util/format: add missing vulkan formats
Add some missing vulkan formats to util/format, this solves all the missing pipe format cases for the formats that turnip supports. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3170>
Diffstat (limited to 'src/util/format')
-rw-r--r--src/util/format/u_format.csv21
-rw-r--r--src/util/format/u_format.h8
2 files changed, 27 insertions, 2 deletions
diff --git a/src/util/format/u_format.csv b/src/util/format/u_format.csv
index 61ad815d845..4bc9e4b83aa 100644
--- a/src/util/format/u_format.csv
+++ b/src/util/format/u_format.csv
@@ -124,8 +124,10 @@ PIPE_FORMAT_I32_FLOAT , plain, 1, 1, 1, f32 , , , , xx
# 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
@@ -344,15 +346,23 @@ PIPE_FORMAT_R8G8B8A8_UNORM , plain, 1, 1, 1, un8 , un8 , un8 , un8 , xy
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
@@ -451,12 +461,18 @@ PIPE_FORMAT_I32_SINT , plain, 1, 1, 1, sp32, , , , xxxx, rgb
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
@@ -496,6 +512,7 @@ PIPE_FORMAT_R16A16_SINT , plain, 1, 1, 1, sp16 , sp16 , , ,
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
diff --git a/src/util/format/u_format.h b/src/util/format/u_format.h
index b85bd217b2e..9d5972fe945 100644
--- a/src/util/format/u_format.h
+++ b/src/util/format/u_format.h
@@ -974,8 +974,12 @@ util_format_srgb(enum pipe_format format)
return PIPE_FORMAT_R8_SRGB;
case PIPE_FORMAT_L8A8_UNORM:
return PIPE_FORMAT_L8A8_SRGB;
+ case PIPE_FORMAT_R8G8_UNORM:
+ return PIPE_FORMAT_R8G8_SRGB;
case PIPE_FORMAT_R8G8B8_UNORM:
return PIPE_FORMAT_R8G8B8_SRGB;
+ case PIPE_FORMAT_B8G8R8_UNORM:
+ return PIPE_FORMAT_B8G8R8_SRGB;
case PIPE_FORMAT_A8B8G8R8_UNORM:
return PIPE_FORMAT_A8B8G8R8_SRGB;
case PIPE_FORMAT_X8B8G8R8_UNORM:
@@ -1058,8 +1062,12 @@ util_format_linear(enum pipe_format format)
return PIPE_FORMAT_R8_UNORM;
case PIPE_FORMAT_L8A8_SRGB:
return PIPE_FORMAT_L8A8_UNORM;
+ case PIPE_FORMAT_R8G8_SRGB:
+ return PIPE_FORMAT_R8G8_UNORM;
case PIPE_FORMAT_R8G8B8_SRGB:
return PIPE_FORMAT_R8G8B8_UNORM;
+ case PIPE_FORMAT_B8G8R8_SRGB:
+ return PIPE_FORMAT_B8G8R8_UNORM;
case PIPE_FORMAT_A8B8G8R8_SRGB:
return PIPE_FORMAT_A8B8G8R8_UNORM;
case PIPE_FORMAT_X8B8G8R8_SRGB: