Mesa (master): mesa: Apply StripTextureBorder to CopyTexImage as well.

Eric Anholt anholt at kemper.freedesktop.org
Wed Oct 26 12:44:18 PDT 2011


Module: Mesa
Branch: master
Commit: 638b657f838266e3d4892d06ff53a1c1bee24a9b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=638b657f838266e3d4892d06ff53a1c1bee24a9b

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Oct 25 12:10:21 2011 -0700

mesa: Apply StripTextureBorder to CopyTexImage as well.

Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/main/teximage.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index a93ae94..acf7187 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -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);



More information about the mesa-commit mailing list