diff options
author | Mark Mueller <MarkKMueller@gmail.com> | 2014-01-20 14:21:43 -0800 |
---|---|---|
committer | Mark Mueller <MarkKMueller@gmail.com> | 2014-01-27 14:29:13 -0800 |
commit | ef145ba4ded6aafb28e3bda02fb348e6b8bff12a (patch) | |
tree | 055904f1dd870171e87e792c878e9712ae50c722 /src/mesa/drivers/dri/r200 | |
parent | 71fe9437169cfdafda8814aa814bb85429fb6cfc (diff) | |
download | external_mesa3d-ef145ba4ded6aafb28e3bda02fb348e6b8bff12a.zip external_mesa3d-ef145ba4ded6aafb28e3bda02fb348e6b8bff12a.tar.gz external_mesa3d-ef145ba4ded6aafb28e3bda02fb348e6b8bff12a.tar.bz2 |
mesa: Rename 4 color component unsigned byte MESA_FORMATs
Change all 4 color component unsigned byte formats to meet spec for P
Type formats:
s/MESA_FORMAT_RGBA8888\b/MESA_FORMAT_A8B8G8R8_UNORM/g
s/MESA_FORMAT_RGBA8888_REV\b/MESA_FORMAT_R8G8B8A8_UNORM/g
s/MESA_FORMAT_ARGB8888\b/MESA_FORMAT_B8G8R8A8_UNORM/g
s/MESA_FORMAT_ARGB8888_REV\b/MESA_FORMAT_A8R8G8B8_UNORM/g
s/MESA_FORMAT_RGBX8888\b/MESA_FORMAT_X8B8G8R8_UNORM/g
s/MESA_FORMAT_RGBX8888_REV\b/MESA_FORMAT_R8G8B8X8_UNORM/g
s/MESA_FORMAT_XRGB8888\b/MESA_FORMAT_B8G8R8X8_UNORM/g
s/MESA_FORMAT_XRGB8888_REV\b/MESA_FORMAT_X8R8G8B8_UNORM/g
Diffstat (limited to 'src/mesa/drivers/dri/r200')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_blit.c | 32 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_texstate.c | 22 |
2 files changed, 27 insertions, 27 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_blit.c b/src/mesa/drivers/dri/r200/r200_blit.c index 825358a..142a517 100644 --- a/src/mesa/drivers/dri/r200/r200_blit.c +++ b/src/mesa/drivers/dri/r200/r200_blit.c @@ -42,8 +42,8 @@ unsigned r200_check_blit(mesa_format mesa_format, uint32_t dst_pitch) { /* XXX others? BE/LE? */ switch (mesa_format) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: case MESA_FORMAT_RGB565: case MESA_FORMAT_ARGB4444: case MESA_FORMAT_ARGB1555: @@ -51,8 +51,8 @@ unsigned r200_check_blit(mesa_format mesa_format, uint32_t dst_pitch) case MESA_FORMAT_L8: case MESA_FORMAT_I8: /* swizzled */ - case MESA_FORMAT_RGBA8888: - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_A8B8G8R8_UNORM: + case MESA_FORMAT_R8G8B8A8_UNORM: break; default: return 0; @@ -114,16 +114,16 @@ static void inline emit_tx_setup(struct r200_context *r200, /* XXX others? BE/LE? */ switch (src_mesa_format) { - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: txformat |= R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP; break; - case MESA_FORMAT_RGBA8888: + case MESA_FORMAT_A8B8G8R8_UNORM: txformat |= R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP; break; - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_R8G8B8A8_UNORM: txformat |= R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP; break; - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: txformat |= R200_TXFORMAT_ARGB8888; break; case MESA_FORMAT_RGB565: @@ -155,8 +155,8 @@ static void inline emit_tx_setup(struct r200_context *r200, offset |= R200_TXO_MICRO_TILE; switch (dst_mesa_format) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: case MESA_FORMAT_RGB565: case MESA_FORMAT_ARGB4444: case MESA_FORMAT_ARGB1555: @@ -182,7 +182,7 @@ static void inline emit_tx_setup(struct r200_context *r200, R200_TXA_OUTPUT_REG_R0)); END_BATCH(); break; - case MESA_FORMAT_RGBA8888: + case MESA_FORMAT_A8B8G8R8_UNORM: BEGIN_BATCH(10); OUT_BATCH_REGVAL(RADEON_PP_CNTL, (RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE)); @@ -202,7 +202,7 @@ static void inline emit_tx_setup(struct r200_context *r200, R200_TXA_OUTPUT_REG_R0)); END_BATCH(); break; - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_R8G8B8A8_UNORM: BEGIN_BATCH(34); OUT_BATCH_REGVAL(RADEON_PP_CNTL, (RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE | @@ -308,10 +308,10 @@ static inline void emit_cb_setup(struct r200_context *r200, /* XXX others? BE/LE? */ switch (mesa_format) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: - case MESA_FORMAT_RGBA8888: - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: + case MESA_FORMAT_A8B8G8R8_UNORM: + case MESA_FORMAT_R8G8B8A8_UNORM: dst_format = RADEON_COLOR_FORMAT_ARGB8888; break; case MESA_FORMAT_RGB565: diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c index 12afb76..80dea79 100644 --- a/src/mesa/drivers/dri/r200/r200_texstate.c +++ b/src/mesa/drivers/dri/r200/r200_texstate.c @@ -69,10 +69,10 @@ struct tx_table { static const struct tx_table tx_table_be[] = { - [ MESA_FORMAT_RGBA8888 ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_RGBA8888_REV ] = { R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_ARGB8888 ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_ARGB8888_REV ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_A8B8G8R8_UNORM ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_R8G8B8A8_UNORM ] = { R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_B8G8R8A8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_A8R8G8B8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, [ MESA_FORMAT_RGB888 ] = { 0xffffffff, 0 }, [ MESA_FORMAT_RGB565 ] = { R200_TXFORMAT_RGB565, 0 }, [ MESA_FORMAT_RGB565_REV ] = { R200_TXFORMAT_RGB565, 0 }, @@ -97,10 +97,10 @@ static const struct tx_table tx_table_be[] = static const struct tx_table tx_table_le[] = { - [ MESA_FORMAT_RGBA8888 ] = { R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_RGBA8888_REV ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_ARGB8888 ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_ARGB8888_REV ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_A8B8G8R8_UNORM ] = { R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_R8G8B8A8_UNORM ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_B8G8R8A8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_A8R8G8B8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, [ MESA_FORMAT_RGB888 ] = { R200_TXFORMAT_ARGB8888, 0 }, [ MESA_FORMAT_RGB565 ] = { R200_TXFORMAT_RGB565, 0 }, [ MESA_FORMAT_RGB565_REV ] = { R200_TXFORMAT_RGB565, 0 }, @@ -772,10 +772,10 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format t->pp_txformat = tx_table_le[MESA_FORMAT_RGB888].format; } else { - texFormat = MESA_FORMAT_ARGB8888; - t->pp_txformat = tx_table_le[MESA_FORMAT_ARGB8888].format; + texFormat = MESA_FORMAT_B8G8R8A8_UNORM; + t->pp_txformat = tx_table_le[MESA_FORMAT_B8G8R8A8_UNORM].format; } - t->pp_txfilter |= tx_table_le[MESA_FORMAT_ARGB8888].filter; + t->pp_txfilter |= tx_table_le[MESA_FORMAT_B8G8R8A8_UNORM].filter; break; case 3: default: |