aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-03-31 13:38:39 +1000
committerDave Airlie <[email protected]>2009-03-31 13:39:57 +1000
commit5ad32cfd21bc9c798d05f5202cc75d37cc258354 (patch)
tree91ab2d0bb51edc9cff57f428c8e394f3ff53048a /src/mesa/drivers
parent5c7fc1cb8e59d1603df17db8c7c63a92441ac820 (diff)
r200: fix glean pixelFormats regression
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 5808633b7b0..21529f62fa5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -276,6 +276,8 @@ static const struct gl_texture_format *radeonChoose8888TexFormat(radeonContextPt
(srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8) ||
(srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && !littleEndian)) {
return &_mesa_texformat_rgba8888_rev;
+ } else if (IS_R200_CLASS(rmesa->radeonScreen)) {
+ return _dri_texformat_argb8888;
} else if (srcFormat == GL_BGRA && ((srcType == GL_UNSIGNED_BYTE && !littleEndian) ||
srcType == GL_UNSIGNED_INT_8_8_8_8)) {
return &_mesa_texformat_argb8888_rev;
@@ -376,8 +378,12 @@ const struct gl_texture_format *radeonChooseTextureFormat(GLcontext * ctx,
case GL_ALPHA12:
case GL_ALPHA16:
case GL_COMPRESSED_ALPHA:
- return _dri_texformat_a8;
-
+ /* r200: can't use a8 format since interpreting hw I8 as a8 would result
+ in wrong rgb values (same as alpha value instead of 0). */
+ if (IS_R200_CLASS(rmesa->radeonScreen))
+ return _dri_texformat_al88;
+ else
+ return _dri_texformat_a8;
case 1:
case GL_LUMINANCE:
case GL_LUMINANCE4: