ctx->Const.MaxTextureMaxAnisotropy = 16.0;
ctx->Const.MaxTextureLodBias = 16.0;
- if (screen->chip_family >= CHIP_FAMILY_RV515) {
+ if (screen->chip_family >= CHIP_FAMILY_RV515)
ctx->Const.MaxTextureLevels = 13;
- ctx->Const.MaxTextureRectSize = 4096;
- }
+ else
+ ctx->Const.MaxTextureLevels = 12;
+
+ driCalculateMaxTextureLevels( r300->texture_heaps,
+ r300->nr_heaps,
+ & ctx->Const,
+ 4,
+ ctx->Const.MaxTextureLevels - 1,
+ MIN2(ctx->Const.MaxTextureLevels,
+ MAX_3D_TEXTURE_LEVELS) - 1,
+ ctx->Const.MaxTextureLevels - 1,
+ ctx->Const.MaxTextureLevels - 1,
+ ctx->Const.MaxTextureLevels - 1,
+ GL_FALSE,
+ 2 );
ctx->Const.MinPointSize = 1.0;
ctx->Const.MinPointSizeAA = 1.0;
typedef struct r300_tex_obj r300TexObj, *r300TexObjPtr;
+/* Maximum number of mipmap levels supported by any supported GPU
+ */
+#define R300_MAX_TEXTURE_LEVELS 13
+
/* Texture object in locally shared texture space.
*/
struct r300_tex_obj {
GLuint bufAddr; /* Offset to start of locally
shared texture block */
- drm_radeon_tex_image_t image[6][RADEON_MAX_TEXTURE_LEVELS];
+ drm_radeon_tex_image_t image[6][R300_MAX_TEXTURE_LEVELS];
/* Six, for the cube faces */
GLboolean image_override; /* Image overridden by GLX_EXT_tfp */
ASSERT(face < 6);
/* Ensure we have a valid texture to upload */
- if ((hwlevel < 0) || (hwlevel >= RADEON_MAX_TEXTURE_LEVELS)) {
+ if ((hwlevel < 0) || (hwlevel >= R300_MAX_TEXTURE_LEVELS)) {
_mesa_problem(NULL, "bad texture level in %s", __FUNCTION__);
return;
}
numLevels = t->base.lastLevel - t->base.firstLevel + 1;
- assert(numLevels <= RADEON_MAX_TEXTURE_LEVELS);
+ assert(numLevels <= R300_MAX_TEXTURE_LEVELS);
/* Calculate mipmap offsets and dimensions for blitting (uploading)
* The idea is that we lay out the mipmap levels within a block of