t->pp_txfilter &= ~(RADEON_MIN_FILTER_MASK | RADEON_MAG_FILTER_MASK);
- if ( anisotropy == RADEON_MAX_ANISO_1_TO_1 ) {
+ /* r100 chips can't handle mipmaps/aniso for cubemap/volume textures */
+ if ( t->base.tObj->Target == GL_TEXTURE_CUBE_MAP ) {
+ switch ( minf ) {
+ case GL_NEAREST:
+ case GL_NEAREST_MIPMAP_NEAREST:
+ case GL_NEAREST_MIPMAP_LINEAR:
+ t->pp_txfilter |= RADEON_MIN_FILTER_NEAREST;
+ break;
+ case GL_LINEAR:
+ case GL_LINEAR_MIPMAP_NEAREST:
+ case GL_LINEAR_MIPMAP_LINEAR:
+ t->pp_txfilter |= RADEON_MIN_FILTER_LINEAR;
+ break;
+ default:
+ break;
+ }
+ }
+ else if ( anisotropy == RADEON_MAX_ANISO_1_TO_1 ) {
switch ( minf ) {
case GL_NEAREST:
t->pp_txfilter |= RADEON_MIN_FILTER_NEAREST;
case GL_UNSIGNED_SHORT_1_5_5_5_REV:
return _dri_texformat_argb1555;
default:
- return do32bpt ? _dri_texformat_rgba8888 : _dri_texformat_argb4444;
+ return do32bpt ? _dri_texformat_argb8888 : _dri_texformat_argb4444;
}
case 3:
case GL_UNSIGNED_SHORT_5_6_5_REV:
return _dri_texformat_rgb565;
default:
- return do32bpt ? _dri_texformat_rgba8888 : _dri_texformat_rgb565;
+ return do32bpt ? _dri_texformat_argb8888 : _dri_texformat_rgb565;
}
case GL_RGBA8:
case GL_RGBA12:
case GL_RGBA16:
return !force16bpt ?
- _dri_texformat_rgba8888 : _dri_texformat_argb4444;
+ _dri_texformat_argb8888 : _dri_texformat_argb4444;
case GL_RGBA4:
case GL_RGBA2:
case GL_RGB10:
case GL_RGB12:
case GL_RGB16:
- return !force16bpt ? _dri_texformat_rgba8888 : _dri_texformat_rgb565;
+ return !force16bpt ? _dri_texformat_argb8888 : _dri_texformat_rgb565;
case GL_RGB5:
case GL_RGB4:
}
assert( (target != GL_TEXTURE_1D && target != GL_TEXTURE_2D &&
- target != GL_TEXTURE_RECTANGLE_NV) ||
+ target != GL_TEXTURE_RECTANGLE_NV && target != GL_TEXTURE_CUBE_MAP) ||
(texObj->DriverData != NULL) );
}