mesa: Apply StripTextureBorder to CopyTexImage as well.
authorEric Anholt <eric@anholt.net>
Tue, 25 Oct 2011 19:10:21 +0000 (12:10 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 26 Oct 2011 19:42:20 +0000 (12:42 -0700)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/teximage.c

index a93ae946ea5c3c3db0ae87b9eee904444b3f7729..acf7187fded7ae0a8398c4f2a88373048f417e35 100644 (file)
@@ -2713,6 +2713,16 @@ copyteximage(struct gl_context *ctx, GLuint dims,
 
    texObj = _mesa_get_current_tex_object(ctx, target);
 
+   if (border && ctx->Const.StripTextureBorder) {
+      x += border;
+      width -= border * 2;
+      if (dims == 2) {
+        y += border;
+        height -= border * 2;
+      }
+      border = 0;
+   }
+
    _mesa_lock_texture(ctx, texObj);
    {
       texImage = _mesa_get_tex_image(ctx, texObj, target, level);