aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_gen_mipmap.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_gen_mipmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_gen_mipmap.c b/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
index e5512af2a..d01a21ebf 100644
--- a/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
@@ -118,7 +118,7 @@ compute_num_levels(struct gl_context *ctx,
baseImage = _mesa_get_tex_image(ctx, texObj, target, texObj->BaseLevel);
numLevels = texObj->BaseLevel + baseImage->MaxNumLevels;
- numLevels = MIN2(numLevels, texObj->MaxLevel + 1);
+ numLevels = MIN2(numLevels, (GLuint) texObj->MaxLevel + 1);
assert(numLevels >= 1);
return numLevels;