summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 02ef961e4d..866683c23e 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1366,7 +1366,7 @@ calculate_first_last_level(struct st_texture_object *stObj)
}
else {
firstLevel = 0;
- lastLevel = MIN2(tObj->MaxLevel, tObj->Image[0][0]->WidthLog2);
+ lastLevel = MIN2(tObj->MaxLevel, tObj->Image[0][tObj->BaseLevel]->WidthLog2);
}
break;
case GL_TEXTURE_RECTANGLE_NV: