Mesa (master): swrast: fix incorrect width for direct/nearest blit

Brian Paul brianp at kemper.freedesktop.org
Tue Jan 22 21:55:35 UTC 2013


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

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Jan 21 08:59:25 2013 -0700

swrast: fix incorrect width for direct/nearest blit

Reviewed-by: José Fonseca <jfonseca at vmware.com>

---

 src/mesa/swrast/s_blit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c
index 605c80a..08ec5e2 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,




More information about the mesa-commit mailing list