From: Brian Paul Date: Wed, 28 Apr 2010 16:05:00 +0000 (-0600) Subject: st/mesa: fill in stImage->level in st_generate_mipmap() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=56f99ee640772f71c1eac0388ba2d70935010e3e;p=mesa.git st/mesa: fill in stImage->level in st_generate_mipmap() Before, this field was always zero for all the new mipmap levels. Fixes problems with glGetTexImage() from a generated mipmap. --- diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c index f67d7b4cb5c..4a3e38de449 100644 --- a/src/mesa/state_tracker/st_gen_mipmap.c +++ b/src/mesa/state_tracker/st_gen_mipmap.c @@ -297,7 +297,9 @@ st_generate_mipmap(GLcontext *ctx, GLenum target, dstImage->TexFormat = srcImage->TexFormat; - stImage = (struct st_texture_image *) dstImage; + stImage = st_texture_image(dstImage); + stImage->level = dstLevel; + pipe_texture_reference(&stImage->pt, pt); } }