summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/unichrome/via_tex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_tex.c')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c
index 1cba08dee8..0261a3ff17 100644
--- a/src/mesa/drivers/dri/unichrome/via_tex.c
+++ b/src/mesa/drivers/dri/unichrome/via_tex.c
@@ -513,11 +513,11 @@ static GLboolean viaSetTexImages(GLcontext *ctx,
numLevels = lastLevel - firstLevel + 1;
- /* The hardware only supports 10 mipmap levels. Ignore higher levels.
+ /* The hardware supports only 10 mipmap levels; ignore higher levels.
*/
- if (numLevels > 10) {
- lastLevel -= numLevels - 10;
- numLevels = 10;
+ if ((numLevels > 10) && (ctx->Const.MaxTextureLevels > 10)) {
+ lastLevel -= numLevels - 10;
+ numLevels = 10;
}
/* save these values, check if they effect the residency of the