From b70b4862491121d5cc4444cea34f2f86a3aa5ded Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Jan 2013 08:59:25 -0700 Subject: [PATCH] swrast: fix incorrect width for direct/nearest blit MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: José Fonseca --- src/mesa/swrast/s_blit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c index 605c80ade14..08ec5e2d0e0 100644 --- a/src/mesa/swrast/s_blit.c +++ b/src/mesa/swrast/s_blit.c @@ -347,7 +347,7 @@ blit_nearest(struct gl_context *ctx, /* store pixel row in destination */ switch (mode) { case DIRECT: - memcpy(dstRowStart, dstBuffer, pixelSize * srcWidth); + memcpy(dstRowStart, dstBuffer, pixelSize * dstWidth); break; case UNPACK_RGBA_FLOAT: _mesa_pack_float_rgba_row(drawRb->Format, dstWidth, dstBuffer, -- 2.30.2