summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/radeon_exa_render.c35
-rw-r--r--src/radeon_reg.h1
2 files changed, 15 insertions, 21 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index e28b1021..98b8dfdd 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -95,7 +95,6 @@ static struct blendinfo RadeonBlendOp[] = {
struct formatinfo {
int fmt;
- Bool byte_swap;
CARD32 card_fmt;
};
@@ -103,25 +102,23 @@ struct formatinfo {
* TXFORMAT_Y8 expands to (Y,Y,Y,1). TXFORMAT_I8 expands to (I,I,I,I)
*/
static struct formatinfo R100TexFormats[] = {
- {PICT_a8r8g8b8, 0, RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP},
- {PICT_x8r8g8b8, 0, RADEON_TXFORMAT_ARGB8888},
- {PICT_a8b8g8r8, 1, RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP},
- {PICT_x8b8g8r8, 1, RADEON_TXFORMAT_RGBA8888},
- {PICT_r5g6b5, 0, RADEON_TXFORMAT_RGB565},
- {PICT_a1r5g5b5, 0, RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP},
- {PICT_x1r5g5b5, 0, RADEON_TXFORMAT_ARGB1555},
- {PICT_a8, 0, RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP},
+ {PICT_a8r8g8b8, RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP},
+ {PICT_x8r8g8b8, RADEON_TXFORMAT_ARGB8888},
+ {PICT_r5g6b5, RADEON_TXFORMAT_RGB565},
+ {PICT_a1r5g5b5, RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP},
+ {PICT_x1r5g5b5, RADEON_TXFORMAT_ARGB1555},
+ {PICT_a8, RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP},
};
static struct formatinfo R200TexFormats[] = {
- {PICT_a8r8g8b8, 0, R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP},
- {PICT_x8r8g8b8, 0, R200_TXFORMAT_ARGB8888},
- {PICT_a8b8g8r8, 1, R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP},
- {PICT_x8b8g8r8, 1, R200_TXFORMAT_RGBA8888},
- {PICT_r5g6b5, 0, R200_TXFORMAT_RGB565},
- {PICT_a1r5g5b5, 0, R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP},
- {PICT_x1r5g5b5, 0, R200_TXFORMAT_ARGB1555},
- {PICT_a8, 0, R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP},
+ {PICT_a8r8g8b8, R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP},
+ {PICT_x8r8g8b8, R200_TXFORMAT_ARGB8888},
+ {PICT_a8b8g8r8, R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP},
+ {PICT_x8b8g8r8, R200_TXFORMAT_ABGR8888},
+ {PICT_r5g6b5, R200_TXFORMAT_RGB565},
+ {PICT_a1r5g5b5, R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP},
+ {PICT_x1r5g5b5, R200_TXFORMAT_ARGB1555},
+ {PICT_a8, R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP},
};
/* Common Radeon setup code */
@@ -245,8 +242,6 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
break;
}
txformat = R100TexFormats[i].card_fmt;
- if (R100TexFormats[i].byte_swap)
- txoffset |= RADEON_TXO_ENDIAN_BYTE_SWAP;
if (RADEONPixmapIsColortiled(pPix))
txoffset |= RADEON_TXO_MACRO_TILE;
@@ -500,8 +495,6 @@ static Bool FUNC_NAME(R200TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
break;
}
txformat = R200TexFormats[i].card_fmt;
- if (R200TexFormats[i].byte_swap)
- txoffset |= R200_TXO_ENDIAN_BYTE_SWAP;
if (RADEONPixmapIsColortiled(pPix))
txoffset |= R200_TXO_MACRO_TILE;
diff --git a/src/radeon_reg.h b/src/radeon_reg.h
index 53cc8032..b7c6e263 100644
--- a/src/radeon_reg.h
+++ b/src/radeon_reg.h
@@ -2435,6 +2435,7 @@
# define R200_TXFORMAT_DXT1 (12 << 0)
# define R200_TXFORMAT_DXT23 (14 << 0)
# define R200_TXFORMAT_DXT45 (15 << 0)
+# define R200_TXFORMAT_ABGR8888 (22 << 0)
# define R200_TXFORMAT_FORMAT_MASK (31 << 0)
# define R200_TXFORMAT_FORMAT_SHIFT 0
# define R200_TXFORMAT_ALPHA_IN_MAP (1 << 6)