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>
Fri, 26 Mar 2010 00:30:37 +0000 (17:30 -0700)
If a non-zero src_y was used, this would break piglit
depth-level-clamp.
(cherry picked from commit e1e48ea15c1fe448f0b69e086b66c1123dc98bb7)

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

index f042bcbc28ce38c5a47ebdd4f53b6747f03b40cb..563baa36c466a66948b9bc6d6914f7b3eb46337a 100644 (file)
@@ -316,7 +316,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)