summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon
diff options
context:
space:
mode:
authorMark Mueller <[email protected]>2014-01-20 14:21:43 -0800
committerMark Mueller <[email protected]>2014-01-27 14:29:13 -0800
commitef145ba4ded6aafb28e3bda02fb348e6b8bff12a (patch)
tree055904f1dd870171e87e792c878e9712ae50c722 /src/mesa/drivers/dri/radeon
parent71fe9437169cfdafda8814aa814bb85429fb6cfc (diff)
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/radeon')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_blit.c14
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_pixel_read.c8
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c16
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex_copy.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texstate.c14
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c12
6 files changed, 34 insertions, 34 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_blit.c b/src/mesa/drivers/dri/radeon/radeon_blit.c
index e5d49ee6b00..5e291672f68 100644
--- a/src/mesa/drivers/dri/radeon/radeon_blit.c
+++ b/src/mesa/drivers/dri/radeon/radeon_blit.c
@@ -42,8 +42,8 @@ unsigned r100_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:
@@ -108,13 +108,13 @@ static void inline emit_tx_setup(struct r100_context *r100,
/* XXX others? BE/LE? */
switch (mesa_format) {
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_B8G8R8A8_UNORM:
txformat |= RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_A8B8G8R8_UNORM:
txformat |= RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_B8G8R8X8_UNORM:
txformat |= RADEON_TXFORMAT_ARGB8888;
break;
case MESA_FORMAT_RGB565:
@@ -186,8 +186,8 @@ static inline void emit_cb_setup(struct r100_context *r100,
/* 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:
dst_format = RADEON_COLOR_FORMAT_ARGB8888;
break;
case MESA_FORMAT_RGB565:
diff --git a/src/mesa/drivers/dri/radeon/radeon_pixel_read.c b/src/mesa/drivers/dri/radeon/radeon_pixel_read.c
index e9bfc0df265..ee0f7782793 100644
--- a/src/mesa/drivers/dri/radeon/radeon_pixel_read.c
+++ b/src/mesa/drivers/dri/radeon/radeon_pixel_read.c
@@ -57,10 +57,10 @@ static mesa_format gl_format_and_type_to_mesa_format(GLenum format, GLenum type)
case GL_UNSIGNED_SHORT_5_5_5_1:
return MESA_FORMAT_RGBA5551;
case GL_UNSIGNED_INT_8_8_8_8:
- return MESA_FORMAT_RGBA8888;
+ return MESA_FORMAT_A8B8G8R8_UNORM;
case GL_UNSIGNED_BYTE:
case GL_UNSIGNED_INT_8_8_8_8_REV:
- return MESA_FORMAT_RGBA8888_REV;
+ return MESA_FORMAT_R8G8B8A8_UNORM;
}
break;
case GL_BGRA:
@@ -74,10 +74,10 @@ static mesa_format gl_format_and_type_to_mesa_format(GLenum format, GLenum type)
case GL_UNSIGNED_SHORT_1_5_5_5_REV:
return MESA_FORMAT_ARGB1555;
case GL_UNSIGNED_INT_8_8_8_8:
- return MESA_FORMAT_ARGB8888_REV;
+ return MESA_FORMAT_A8R8G8B8_UNORM;
case GL_UNSIGNED_BYTE:
case GL_UNSIGNED_INT_8_8_8_8_REV:
- return MESA_FORMAT_ARGB8888;
+ return MESA_FORMAT_B8G8R8A8_UNORM;
}
break;
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index d90bafa9818..3dcdcba00d3 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -219,12 +219,12 @@ radeon_create_image_from_name(__DRIscreen *screen,
image->data_type = GL_UNSIGNED_BYTE;
break;
case __DRI_IMAGE_FORMAT_XRGB8888:
- image->format = MESA_FORMAT_XRGB8888;
+ image->format = MESA_FORMAT_B8G8R8X8_UNORM;
image->internal_format = GL_RGB;
image->data_type = GL_UNSIGNED_BYTE;
break;
case __DRI_IMAGE_FORMAT_ARGB8888:
- image->format = MESA_FORMAT_ARGB8888;
+ image->format = MESA_FORMAT_B8G8R8A8_UNORM;
image->internal_format = GL_RGBA;
image->data_type = GL_UNSIGNED_BYTE;
break;
@@ -319,12 +319,12 @@ radeon_create_image(__DRIscreen *screen,
image->data_type = GL_UNSIGNED_BYTE;
break;
case __DRI_IMAGE_FORMAT_XRGB8888:
- image->format = MESA_FORMAT_XRGB8888;
+ image->format = MESA_FORMAT_B8G8R8X8_UNORM;
image->internal_format = GL_RGB;
image->data_type = GL_UNSIGNED_BYTE;
break;
case __DRI_IMAGE_FORMAT_ARGB8888:
- image->format = MESA_FORMAT_ARGB8888;
+ image->format = MESA_FORMAT_B8G8R8A8_UNORM;
image->internal_format = GL_RGBA;
image->data_type = GL_UNSIGNED_BYTE;
break;
@@ -613,9 +613,9 @@ radeonCreateBuffer( __DRIscreen *driScrnPriv,
if (mesaVis->redBits == 5)
rgbFormat = _mesa_little_endian() ? MESA_FORMAT_RGB565 : MESA_FORMAT_RGB565_REV;
else if (mesaVis->alphaBits == 0)
- rgbFormat = _mesa_little_endian() ? MESA_FORMAT_XRGB8888 : MESA_FORMAT_XRGB8888_REV;
+ rgbFormat = _mesa_little_endian() ? MESA_FORMAT_B8G8R8X8_UNORM : MESA_FORMAT_X8R8G8B8_UNORM;
else
- rgbFormat = _mesa_little_endian() ? MESA_FORMAT_ARGB8888 : MESA_FORMAT_ARGB8888_REV;
+ rgbFormat = _mesa_little_endian() ? MESA_FORMAT_B8G8R8A8_UNORM : MESA_FORMAT_A8R8G8B8_UNORM;
/* front color renderbuffer */
rfb->color_rb[0] = radeon_create_renderbuffer(rgbFormat, driDrawPriv);
@@ -710,8 +710,8 @@ __DRIconfig **radeonInitScreen2(__DRIscreen *psp)
{
static const mesa_format formats[3] = {
MESA_FORMAT_RGB565,
- MESA_FORMAT_XRGB8888,
- MESA_FORMAT_ARGB8888
+ MESA_FORMAT_B8G8R8X8_UNORM,
+ MESA_FORMAT_B8G8R8A8_UNORM
};
/* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't
* support pageflipping at all.
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
index fc723842c11..9e7ecca0f68 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
@@ -112,8 +112,8 @@ do_copy_texsubimage(struct gl_context *ctx,
dst_mesaformat = MESA_FORMAT_RGB565;
break;
case 4:
- src_mesaformat = MESA_FORMAT_ARGB8888;
- dst_mesaformat = MESA_FORMAT_ARGB8888;
+ src_mesaformat = MESA_FORMAT_B8G8R8A8_UNORM;
+ dst_mesaformat = MESA_FORMAT_B8G8R8A8_UNORM;
break;
case 1:
src_mesaformat = MESA_FORMAT_A8;
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index 5550a5aa1ec..51c36e9ee84 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -74,10 +74,10 @@ struct tx_table {
static const struct tx_table tx_table[] =
{
[ MESA_FORMAT_NONE ] = { 0xffffffff, 0 },
- [ MESA_FORMAT_RGBA8888 ] = { RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_RGBA8888_REV ] = { RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB8888 ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB8888_REV ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A8B8G8R8_UNORM ] = { RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_R8G8B8A8_UNORM ] = { RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B8G8R8A8_UNORM ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A8R8G8B8_UNORM ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_RGB888 ] = { RADEON_TXFORMAT_ARGB8888, 0 },
[ MESA_FORMAT_RGB565 ] = { RADEON_TXFORMAT_RGB565, 0 },
[ MESA_FORMAT_RGB565_REV ] = { RADEON_TXFORMAT_RGB565, 0 },
@@ -647,10 +647,10 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form
texFormat = MESA_FORMAT_RGB888;
}
else {
- t->pp_txformat = tx_table[MESA_FORMAT_ARGB8888].format;
- texFormat = MESA_FORMAT_ARGB8888;
+ t->pp_txformat = tx_table[MESA_FORMAT_B8G8R8A8_UNORM].format;
+ texFormat = MESA_FORMAT_B8G8R8A8_UNORM;
}
- t->pp_txfilter |= tx_table[MESA_FORMAT_ARGB8888].filter;
+ t->pp_txfilter |= tx_table[MESA_FORMAT_B8G8R8A8_UNORM].filter;
break;
case 3:
default:
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 8455b826270..15ab677ce39 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -231,12 +231,12 @@ static mesa_format radeonChoose8888TexFormat(radeonContextPtr rmesa,
(srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && !littleEndian) ||
(srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) ||
(srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && littleEndian)) {
- return MESA_FORMAT_RGBA8888;
+ return MESA_FORMAT_A8B8G8R8_UNORM;
} else if ((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) ||
(srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && littleEndian) ||
(srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8) ||
(srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && !littleEndian)) {
- return MESA_FORMAT_RGBA8888_REV;
+ return MESA_FORMAT_R8G8B8A8_UNORM;
} else
return _radeon_texformat_argb8888;
#endif
@@ -592,16 +592,16 @@ static void
radeonInitTextureFormats(void)
{
if (_mesa_little_endian()) {
- _radeon_texformat_rgba8888 = MESA_FORMAT_RGBA8888;
- _radeon_texformat_argb8888 = MESA_FORMAT_ARGB8888;
+ _radeon_texformat_rgba8888 = MESA_FORMAT_A8B8G8R8_UNORM;
+ _radeon_texformat_argb8888 = MESA_FORMAT_B8G8R8A8_UNORM;
_radeon_texformat_rgb565 = MESA_FORMAT_RGB565;
_radeon_texformat_argb4444 = MESA_FORMAT_ARGB4444;
_radeon_texformat_argb1555 = MESA_FORMAT_ARGB1555;
_radeon_texformat_al88 = MESA_FORMAT_AL88;
}
else {
- _radeon_texformat_rgba8888 = MESA_FORMAT_RGBA8888_REV;
- _radeon_texformat_argb8888 = MESA_FORMAT_ARGB8888_REV;
+ _radeon_texformat_rgba8888 = MESA_FORMAT_R8G8B8A8_UNORM;
+ _radeon_texformat_argb8888 = MESA_FORMAT_A8R8G8B8_UNORM;
_radeon_texformat_rgb565 = MESA_FORMAT_RGB565_REV;
_radeon_texformat_argb4444 = MESA_FORMAT_ARGB4444_REV;
_radeon_texformat_argb1555 = MESA_FORMAT_ARGB1555_REV;