swrast: fix incorrect width for direct/nearest blit
authorBrian Paul <brianp@vmware.com>
Mon, 21 Jan 2013 15:59:25 +0000 (08:59 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 22 Jan 2013 21:53:58 +0000 (14:53 -0700)
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/swrast/s_blit.c

index 605c80ade140061706bb283977699899b34d8990..08ec5e2d0e0cde8d16d0194b10e7aeaa59310dfa 100644 (file)
@@ -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,