intel: Respect src pitch in _mesa_copy_rect().
authorEric Anholt <eric@anholt.net>
Wed, 17 Mar 2010 17:10:37 +0000 (10:10 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 17 Mar 2010 18:24:01 +0000 (11:24 -0700)
If a non-zero src_y was used, this would break piglit
depth-level-clamp.

src/mesa/drivers/dri/intel/intel_regions.c

index 27e454d2942beaa686ab03cc088d4dcbe0643e2a..1172de90b1385776fd188274ea650d225df91c5d 100644 (file)
@@ -307,7 +307,7 @@ _mesa_copy_rect(GLubyte * dst,
    dst += dst_x * cpp;
    src += src_x * cpp;
    dst += dst_y * dst_pitch;
-   src += src_y * dst_pitch;
+   src += src_y * src_pitch;
    width *= cpp;
 
    if (width == dst_pitch && width == src_pitch)