diff -urN a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c --- a/src/mesa/drivers/dri/radeon/radeon_texture.c 2012-03-22 17:10:07.000000000 +0000 +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c 2012-06-15 13:49:20.575969010 +0100 @@ -285,18 +285,19 @@ /* try to find a format which will only need a memcopy */ static gl_format radeonChoose8888TexFormat(radeonContextPtr rmesa, GLenum srcFormat, - GLenum srcType, GLboolean fbo) + GLenum srcType) { #if defined(RADEON_R100) /* r100 can only do this */ return _radeon_texformat_argb8888; #elif defined(RADEON_R200) + /* causes graphical glitches in gnome shell + seems RGBA8888_REV misinterpreted as ARGB8888 somewhere else + (red & blue swapped in some places) + const GLuint ui = 1; const GLubyte littleEndian = *((const GLubyte *)&ui); - if (fbo) - return _radeon_texformat_argb8888; - if ((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8) || (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && !littleEndian) || (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) || @@ -307,7 +308,7 @@ (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; - } else + } else */ return _radeon_texformat_argb8888; #endif } @@ -318,13 +319,13 @@ GLenum type) { return radeonChooseTextureFormat(ctx, internalFormat, format, - type, 0); + type); } gl_format radeonChooseTextureFormat(struct gl_context * ctx, GLint internalFormat, GLenum format, - GLenum type, GLboolean fbo) + GLenum type) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); const GLboolean do32bpt = @@ -358,7 +359,7 @@ case GL_UNSIGNED_SHORT_1_5_5_5_REV: return _radeon_texformat_argb1555; default: - return do32bpt ? radeonChoose8888TexFormat(rmesa, format, type, fbo) : + return do32bpt ? radeonChoose8888TexFormat(rmesa, format, type) : _radeon_texformat_argb4444; } @@ -385,7 +386,7 @@ case GL_RGBA12: case GL_RGBA16: return !force16bpt ? - radeonChoose8888TexFormat(rmesa, format, type, fbo) : + radeonChoose8888TexFormat(rmesa, format, type) : _radeon_texformat_argb4444; case GL_RGBA4: diff -urN a/src/mesa/drivers/dri/radeon/radeon_texture.h b/src/mesa/drivers/dri/radeon/radeon_texture.h --- a/src/mesa/drivers/dri/radeon/radeon_texture.h 2012-03-22 17:10:07.000000000 +0000 +++ b/src/mesa/drivers/dri/radeon/radeon_texture.h 2012-06-05 00:28:41.869889159 +0100 @@ -63,7 +63,7 @@ gl_format radeonChooseTextureFormat(struct gl_context * ctx, GLint internalFormat, GLenum format, - GLenum type, GLboolean fbo); + GLenum type); void radeonCopyTexSubImage2D(struct gl_context *ctx, struct gl_texture_image *texImage,