diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-03-25 11:13:28 +0100 |
---|---|---|
committer | Michel Dänzer <daenzer@vmware.com> | 2009-03-25 11:19:05 +0100 |
commit | e101959b6a262ba34a12b407ea6f480e6b4d7d72 (patch) | |
tree | 932858d6f0e439123c543ed9838a80f665b770f5 /src/mesa/drivers/dri/r300/r300_context.c | |
parent | e919bfa1f1766e71780d0a4db5a8b6a04d19868f (diff) |
r300: Texture size limit cleanups.
Since core Mesa MAX_TEXTURE_LEVELS was bumped, we were incorrectly advertising
a maximum texture size of 4096 on older chips, causing corrupted menu text in
Extreme Tux Racer or Armagetron.
Also make sure our texture image array can actually hold all the mipmap levels
we support...
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_context.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c index fddd87b85f..12bee1a8fb 100644 --- a/src/mesa/drivers/dri/r300/r300_context.c +++ b/src/mesa/drivers/dri/r300/r300_context.c @@ -288,10 +288,23 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual, 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; |