summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-10-15 17:57:53 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-10-15 17:57:53 +0000
commitb947377add2edb87fc78dcd853cdf00a2119bb3e (patch)
treed873b6d75c6afd5f72f4ec13cab7dcdcfc9e41e1 /src/mesa/drivers
parenta20c0f293e23cf95befcabf316733de10f359b50 (diff)
increate MaxTextureLevels to 11 (bug 3130)
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.c4
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tex.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c
index 2459336bd6..d92da8f496 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.c
+++ b/src/mesa/drivers/dri/unichrome/via_context.c
@@ -557,8 +557,8 @@ viaCreateContext(const __GLcontextModes *visual,
driContextPriv->driverPrivate = vmesa;
ctx = vmesa->glCtx;
-
- ctx->Const.MaxTextureLevels = 10;
+
+ ctx->Const.MaxTextureLevels = 11;
ctx->Const.MaxTextureUnits = 2;
ctx->Const.MaxTextureImageUnits = ctx->Const.MaxTextureUnits;
ctx->Const.MaxTextureCoordUnits = ctx->Const.MaxTextureUnits;
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c
index 939422ce2f..1cba08dee8 100644
--- a/src/mesa/drivers/dri/unichrome/via_tex.c
+++ b/src/mesa/drivers/dri/unichrome/via_tex.c
@@ -513,6 +513,13 @@ static GLboolean viaSetTexImages(GLcontext *ctx,
numLevels = lastLevel - firstLevel + 1;
+ /* The hardware only supports 10 mipmap levels. Ignore higher levels.
+ */
+ if (numLevels > 10) {
+ lastLevel -= numLevels - 10;
+ numLevels = 10;
+ }
+
/* save these values, check if they effect the residency of the
* texture:
*/