summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-04-28 10:05:00 -0600
committerBrian Paul <brianp@vmware.com>2010-04-28 10:05:06 -0600
commit56f99ee640772f71c1eac0388ba2d70935010e3e (patch)
tree0adfc8169bfba578ceba8a9acd66788b9c864f02 /src/mesa
parentef9a8fcb1b651b95c570fd3a46cdea4751d2b725 (diff)
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.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index f67d7b4cb5..4a3e38de44 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);
}
}