summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-10-03 16:33:33 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-10-03 16:33:33 +0200
commit30031b169def5caadb394225919a6079a0957142 (patch)
tree2c5163849d522799aa3c16ca37384f6269088fa7
parent4b4ce36081ca151c24e028c54b59986f41731a73 (diff)
R3/5xx EXA: Add support for BGRA picture formats.
Also add mysteriously missing case statements for ABGR destination formats.
-rw-r--r--src/radeon_exa_render.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index c266fb71..7bc8ef0b 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -125,6 +125,10 @@ static struct formatinfo R300TexFormats[] = {
{PICT_x8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8)},
{PICT_a8b8g8r8, R300_EASY_TX_FORMAT(Z, Y, X, W, W8Z8Y8X8)},
{PICT_x8b8g8r8, R300_EASY_TX_FORMAT(Z, Y, X, ONE, W8Z8Y8X8)},
+#ifdef PICT_TYPE_BGRA
+ {PICT_b8g8r8a8, R300_EASY_TX_FORMAT(W, Z, Y, X, W8Z8Y8X8)},
+ {PICT_b8g8r8x8, R300_EASY_TX_FORMAT(W, Z, Y, ONE, W8Z8Y8X8)},
+#endif
{PICT_r5g6b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5)},
{PICT_a1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, W, W1Z5Y5X5)},
{PICT_x1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W1Z5Y5X5)},
@@ -163,6 +167,12 @@ static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format)
switch (pDstPicture->format) {
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
+ case PICT_a8b8g8r8:
+ case PICT_x8b8g8r8:
+#ifdef PICT_TYPE_BGRA
+ case PICT_b8g8r8a8:
+ case PICT_b8g8r8x8:
+#endif
*dst_format = R300_COLORFORMAT_ARGB8888;
break;
case PICT_r5g6b5:
@@ -1559,6 +1569,16 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture,
R300_OUT_FMT_C2_SEL_BLUE |
R300_OUT_FMT_C3_SEL_ALPHA);
break;
+#ifdef PICT_TYPE_BGRA
+ case PICT_b8g8r8a8:
+ case PICT_b8g8r8x8:
+ output_fmt = (R300_OUT_FMT_C4_8 |
+ R300_OUT_FMT_C0_SEL_ALPHA |
+ R300_OUT_FMT_C1_SEL_RED |
+ R300_OUT_FMT_C2_SEL_GREEN |
+ R300_OUT_FMT_C3_SEL_BLUE);
+ break;
+#endif
case PICT_a8:
output_fmt = (R300_OUT_FMT_C4_8 |
R300_OUT_FMT_C0_SEL_ALPHA);