Merge branch '7.8'
[mesa.git] / src / mesa / state_tracker / st_gen_mipmap.c
index 24a072ee12e16c3472225dc2a289d629b61cc7a9..b8b75c7de629189ae5d35b8e54eaf6ddfb7b5b88 100644 (file)
@@ -377,7 +377,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_resource_reference(&stImage->pt, pt);
    }
 }