/* 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) ||
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;
}
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: