st/gl: Only transfer needed parts in st_TexSubimage
authorJakob Bornecrantz <jakob@vmware.com>
Wed, 18 Mar 2009 18:10:32 +0000 (19:10 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Thu, 19 Mar 2009 01:23:06 +0000 (02:23 +0100)
src/mesa/state_tracker/st_cb_texture.c

index df169b163e016a2abb4462a7787fe0ef8d73f88d..edfa8854d89bdb527dafe2a7162b25758d3cb9fe 100644 (file)
@@ -802,8 +802,7 @@ st_TexSubimage(GLcontext * ctx,
       texImage->Data = st_texture_image_map(ctx->st, stImage, zoffset, 
                                             PIPE_TRANSFER_WRITE,
                                             xoffset, yoffset,
-                                            stImage->base.Width,
-                                            stImage->base.Height);
+                                            width, height);
       dstRowStride = stImage->transfer->stride;
    }
 
@@ -832,8 +831,7 @@ st_TexSubimage(GLcontext * ctx,
         texImage->Data = st_texture_image_map(ctx->st, stImage, zoffset + i,
                                                PIPE_TRANSFER_WRITE,
                                                xoffset, yoffset,
-                                               stImage->base.Width,
-                                               stImage->base.Height);
+                                               width, height);
         src += srcImageStride;
       }
    }