gallium: Introduce a new format to disambiguate PIPE_FORMAT_R8G8B8A8_UNORM.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 1 Mar 2010 16:24:09 +0000 (16:24 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 1 Mar 2010 16:24:09 +0000 (16:24 +0000)
PIPE_FORMAT_R8G8B8A8_UNORM now means just

  R8 G8 B8 A8

PIPE_FORMAT_R8G8B8A8_UNORM_REV means

  A8 B8 G8 R8

And the thumb rule is vertex buffers refer to PIPE_FORMAT_R8G8B8A8_UNORM,
while textures refer to PIPE_FORMAT_R8G8B8A8_UNORM_REV.

PIPE_FORMAT_R8G8B8A8_UNORM_REV is just a temporary name.

src/gallium/include/pipe/p_format.h

index 998d1a639f276e5625e8a33b614f77bdd2d557c6..79e4df7b4de784b0e1c293a5d8876cdf603fa343 100644 (file)
@@ -158,6 +158,8 @@ enum pipe_format {
    PIPE_FORMAT_DXT3_SRGBA            = 108,
    PIPE_FORMAT_DXT5_SRGBA            = 109,
 
+   PIPE_FORMAT_R8G8B8A8_UNORM_REV    = 110,
+
    PIPE_FORMAT_COUNT
 };