From d0bf48f8e99ccb4a6ab2b963e6a88e104e7ae5d8 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sun, 7 Apr 2013 14:29:59 +1000 Subject: [PATCH] st/mesa: fix levels in initial texture creation calim pointed out we were getting mipmap levels for array multisamples, this didn't make sense. So then I noticed this function takes last_level so we are passing in a too high value here. I think this should fix the case he was seeing. Reviewed-by: Brian Paul Signed-off-by: Dave Airlie --- src/mesa/state_tracker/st_cb_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 0cd0d77..2d16920 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1662,7 +1662,7 @@ st_AllocTextureStorage(struct gl_context *ctx, stObj->pt = st_texture_create(st, gl_target_to_pipe(texObj->Target), fmt, - levels, + levels - 1, ptWidth, ptHeight, ptDepth, -- 2.7.4