From: Eric Anholt Date: Tue, 25 Oct 2011 19:10:21 +0000 (-0700) Subject: mesa: Apply StripTextureBorder to CopyTexImage as well. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=638b657f838266e3d4892d06ff53a1c1bee24a9b;p=mesa.git mesa: Apply StripTextureBorder to CopyTexImage as well. Reviewed-by: Brian Paul --- diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index a93ae946ea5..acf7187fded 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);