etnaviv: Avoid duplicates in formats table
authorWladimir J. van der Laan <laanwj@gmail.com>
Fri, 21 Jul 2017 10:49:58 +0000 (12:49 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Fri, 21 Jul 2017 12:41:07 +0000 (14:41 +0200)
Remove the following duplicates from the formats table:

- R8G8B8A8_UNORM (V_,_T)
- R8G8B8X8_UNORM (_T,_T)
- DXT3_RGBA (_T,_T)

Only the first has an effect because the _T overrides the V_ initializer,
the latter two were harmless duplications of the same.

Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
src/gallium/drivers/etnaviv/etnaviv_format.c

index 492499a0d305dbd0be5d4e5bac6798c4588a12a5..69e07bce111576bfa1e53a6573fecb461c3c333e 100644 (file)
@@ -155,7 +155,7 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
 
    V_(A8B8G8R8_UNORM,   UNSIGNED_BYTE, NONE),
 
-   V_(R8G8B8A8_UNORM,   UNSIGNED_BYTE, A8B8G8R8),
+   VT(R8G8B8A8_UNORM,   UNSIGNED_BYTE, A8B8G8R8, SWIZ(X, Y, Z, W), A8B8G8R8),
    V_(R8G8B8A8_SNORM,   BYTE,          A8B8G8R8),
    _T(R8G8B8X8_UNORM,   X8B8G8R8,      SWIZ(X, Y, Z, W), X8B8G8R8),
    V_(R8G8B8A8_UINT,    UNSIGNED_BYTE, A8B8G8R8),
@@ -163,9 +163,6 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
    V_(R8G8B8A8_USCALED, UNSIGNED_BYTE, A8B8G8R8),
    V_(R8G8B8A8_SSCALED, BYTE,          A8B8G8R8),
 
-   _T(R8G8B8A8_UNORM, A8B8G8R8, SWIZ(X, Y, Z, W), A8B8G8R8),
-   _T(R8G8B8X8_UNORM, X8B8G8R8, SWIZ(X, Y, Z, W), X8B8G8R8),
-
    _T(B8G8R8A8_UNORM, A8R8G8B8, SWIZ(X, Y, Z, W), A8R8G8B8),
    _T(B8G8R8X8_UNORM, X8R8G8B8, SWIZ(X, Y, Z, W), X8R8G8B8),
 
@@ -230,7 +227,6 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
    _T(DXT1_RGB,  DXT1,      SWIZ(X, Y, Z, W), NONE),
    _T(DXT1_RGBA, DXT1,      SWIZ(X, Y, Z, W), NONE),
    _T(DXT3_RGBA, DXT2_DXT3, SWIZ(X, Y, Z, W), NONE),
-   _T(DXT3_RGBA, DXT2_DXT3, SWIZ(X, Y, Z, W), NONE),
    _T(DXT5_RGBA, DXT4_DXT5, SWIZ(X, Y, Z, W), NONE),
 
    _T(ETC2_RGB8,       EXT_NONE | EXT_FORMAT,                          SWIZ(X, Y, Z, W), NONE), /* Extd. format NONE doubles as ETC2_RGB8 */