From: Dave Airlie Date: Sun, 7 Apr 2013 04:29:59 +0000 (+1000) Subject: st/mesa: fix levels in initial texture creation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d0bf48f8e99ccb4a6ab2b963e6a88e104e7ae5d8;p=mesa.git 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 --- diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 0cd0d77af22..2d16920a8c8 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,