st: need to free/realloc pipe texture when we're handed image level > last_level
authorBrian Paul <brianp@vmware.com>
Wed, 18 Mar 2009 16:22:05 +0000 (10:22 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 18 Mar 2009 16:24:19 +0000 (10:24 -0600)
Fixes progs/tests/tri-fbo-tex-mip.c

src/mesa/state_tracker/st_cb_texture.c

index f94713abd1dc3217de06f3ceddc703c842536e2e..df169b163e016a2abb4462a7787fe0ef8d73f88d 100644 (file)
@@ -467,6 +467,7 @@ st_TexImage(GLcontext * ctx,
     */
    if (stObj->pt) {
       if (stObj->teximage_realloc ||
+          level > stObj->pt->last_level ||
           (stObj->pt->last_level == level &&
            stObj->pt->target != PIPE_TEXTURE_CUBE &&
            !st_texture_match_image(stObj->pt, &stImage->base,