gallium: Add PIPE_FORMAT_x8B8G8R8_SNORM formats
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Tue, 22 Jul 2014 10:02:05 +0000 (11:02 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 17 Sep 2014 03:17:46 +0000 (13:17 +1000)
This means that each RnGnBnxn format has a reversed counterpart,
which is necessary for handling big-endian mesa<->gallium mappings.
The associated UNORM and SRGB formats already exist.

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 8329cdf780baa035bb9c72fa7c8c332c8dc5d553..a71aaf15dda5916d3a4728a2cd4778cf191e5aed 100644 (file)
@@ -393,3 +393,6 @@ 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
+
+PIPE_FORMAT_A8B8G8R8_SNORM        , plain, 1, 1, sn8 , sn8 , sn8 , sn8 , wzyx, rgb
+PIPE_FORMAT_X8B8G8R8_SNORM        , plain, 1, 1, x8,   sn8,  sn8,  sn8,  wzy1, rgb
index 7eb634d445e6afec1c93f67cee72f7596167da27..d309fa15f5cf8e0a85abef0768a95004306ec5fd 100644 (file)
@@ -359,6 +359,9 @@ enum pipe_format {
    PIPE_FORMAT_G16R16_UNORM            = 265,
    PIPE_FORMAT_G16R16_SNORM            = 266,
 
+   PIPE_FORMAT_A8B8G8R8_SNORM          = 267,
+   PIPE_FORMAT_X8B8G8R8_SNORM          = 268,
+
    PIPE_FORMAT_COUNT
 };