gallium: Add PIPE_FORMAT_AnLn and PIPE_FORMAT_GnRn formats
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Tue, 22 Jul 2014 09:51:15 +0000 (10:51 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 17 Sep 2014 03:17:46 +0000 (13:17 +1000)
...i.e. formats in which the alpha or green channel is first in memory.

This means that each LnAn and RnGn format has a reversed counterpart,
which is necessary for handling big-endian mesa<->gallium mappings.

Signed-off-by: Richard Sandiford <rsandifo@linux.vnet.ibm.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/auxiliary/util/u_format.csv
src/gallium/include/pipe/p_format.h

index affc363635723863baf30a81775446ea6288148e..8329cdf780baa035bb9c72fa7c8c332c8dc5d553 100644 (file)
@@ -384,3 +384,12 @@ PIPE_FORMAT_R10G10B10A2_UINT        , plain, 1, 1, up10 , up10 , up10, up2 , xyz
 
 PIPE_FORMAT_B5G6R5_SRGB             , plain, 1, 1, un5 , un6 , un5 ,     , zyx1, srgb, un5 , un6 , un5 ,     , xyz1
 
+PIPE_FORMAT_A8L8_UNORM            , plain, 1, 1, un8 , un8 , , , yyyx, rgb
+PIPE_FORMAT_A8L8_SNORM            , plain, 1, 1, sn8 , sn8 , , , yyyx, rgb
+PIPE_FORMAT_A8L8_SRGB             , plain, 1, 1, un8 , un8 , , , yyyx, srgb
+PIPE_FORMAT_A16L16_UNORM          , plain, 1, 1, un16, un16, , , yyyx, rgb
+
+PIPE_FORMAT_G8R8_UNORM            , plain, 1, 1, un8 , un8 , , , yx01, rgb
+PIPE_FORMAT_G8R8_SNORM            , plain, 1, 1, sn8 , sn8 , , , yx01, rgb
+PIPE_FORMAT_G16R16_UNORM          , plain, 1, 1, un16, un16, , , yx01, rgb
+PIPE_FORMAT_G16R16_SNORM          , plain, 1, 1, sn16, sn16, , , yx01, rgb
index 1b048840ff8977cca413a8d07fae76c5dd395034..d744205d688a878b07b8bbca57ad80b9c2408853 100644 (file)
@@ -349,6 +349,16 @@ enum pipe_format {
    PIPE_FORMAT_BPTC_RGB_FLOAT          = 257,
    PIPE_FORMAT_BPTC_RGB_UFLOAT         = 258,
 
+   PIPE_FORMAT_A8L8_UNORM              = 259,
+   PIPE_FORMAT_A8L8_SNORM              = 260,
+   PIPE_FORMAT_A8L8_SRGB               = 261,
+   PIPE_FORMAT_A16L16_UNORM            = 262,
+
+   PIPE_FORMAT_G8R8_UNORM              = 263,
+   PIPE_FORMAT_G8R8_SNORM              = 264,
+   PIPE_FORMAT_G16R16_UNORM            = 265,
+   PIPE_FORMAT_G16R16_SNORM            = 266,
+
    PIPE_FORMAT_COUNT
 };