summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-02-11 02:41:39 +1000
committerDave Airlie <[email protected]>2009-02-11 02:41:39 +1000
commit18aca218a29578b5cb14a3bc492330406d3a761d (patch)
tree9e571450e98270a77f2c9bd2e048a260d0da5cd8 /src
parent4c36282ef9e84da15b3e1d9bc28b9bbc8db5e1be (diff)
radeon: r100 can't use some of the texture formats.
this fixes the texrect-many test
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/radeon/common_misc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/radeon/common_misc.c b/src/mesa/drivers/dri/radeon/common_misc.c
index 4770c987c87..934105a778b 100644
--- a/src/mesa/drivers/dri/radeon/common_misc.c
+++ b/src/mesa/drivers/dri/radeon/common_misc.c
@@ -1558,12 +1558,17 @@ void radeonGenerateMipmap(GLcontext* ctx, GLenum target, struct gl_texture_objec
/* try to find a format which will only need a memcopy */
-static const struct gl_texture_format *radeonChoose8888TexFormat(GLenum srcFormat,
- GLenum srcType)
+static const struct gl_texture_format *radeonChoose8888TexFormat(radeonContextPtr rmesa,
+ GLenum srcFormat,
+ GLenum srcType)
{
const GLuint ui = 1;
const GLubyte littleEndian = *((const GLubyte *)&ui);
+ /* r100 can only do this */
+ if (IS_R100_CLASS(rmesa->radeonScreen))
+ return _dri_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) ||
@@ -1619,7 +1624,7 @@ const struct gl_texture_format *radeonChooseTextureFormat(GLcontext * ctx,
case GL_UNSIGNED_SHORT_1_5_5_5_REV:
return _dri_texformat_argb1555;
default:
- return do32bpt ? radeonChoose8888TexFormat(format, type) :
+ return do32bpt ? radeonChoose8888TexFormat(rmesa, format, type) :
_dri_texformat_argb4444;
}
@@ -1646,8 +1651,8 @@ const struct gl_texture_format *radeonChooseTextureFormat(GLcontext * ctx,
case GL_RGBA12:
case GL_RGBA16:
return !force16bpt ?
- radeonChoose8888TexFormat(format,
- type) : _dri_texformat_argb4444;
+ radeonChoose8888TexFormat(rmesa, format,type) :
+ _dri_texformat_argb4444;
case GL_RGBA4:
case GL_RGBA2: