gallium: fix bad srcy coord if do_flip
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 23 Jun 2008 14:51:00 +0000 (08:51 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 23 Jun 2008 14:51:00 +0000 (08:51 -0600)
src/gallium/drivers/cell/ppu/cell_surface.c
src/gallium/drivers/i915simple/i915_surface.c
src/gallium/drivers/i965simple/brw_surface.c

index a35db0ef991e530aafc5fd134af49221857da5bc..4a098101e191642b904b3e9c9c179b63992cc930 100644 (file)
@@ -76,7 +76,7 @@ cell_surface_copy(struct pipe_context *pipe,
                   width, height,
                   pipe_surface_map(src),
                   do_flip ? -src->pitch : src->pitch,
-                  srcx, do_flip ? 1 - srcy - height : srcy);
+                  srcx, do_flip ? height - 1 - srcy : srcy);
 
    pipe_surface_unmap(src);
    pipe_surface_unmap(dst);
index 98367ac0739a6e360bec4841fbfa8a933a507245..1729ea26f5d749258902a059f1ba316f2c8fbf59 100644 (file)
@@ -66,7 +66,7 @@ i915_surface_copy(struct pipe_context *pipe,
                      width, height, 
                      src_map, 
                      do_flip ? -(int) src->pitch : src->pitch, 
-                     srcx, do_flip ? 1 - srcy - height : srcy);
+                     srcx, do_flip ? height - 1 - srcy : srcy);
 
       pipe->screen->surface_unmap(pipe->screen, src);
       pipe->screen->surface_unmap(pipe->screen, dst);
index 3e3736b28065cac9df63fab4e55ae6e878128a3e..62d75bc251e7171454f589883e5bf285f6764d3c 100644 (file)
@@ -66,7 +66,7 @@ brw_surface_copy(struct pipe_context *pipe,
                      width, height, 
                      src_map, 
                      do_flip ? -(int) src->pitch : src->pitch, 
-                     srcx, do_flip ? 1 - srcy - height : srcy);
+                     srcx, do_flip ? height - 1 - srcy : srcy);
 
       pipe->screen->surface_unmap(pipe->screen, src);
       pipe->screen->surface_unmap(pipe->screen, dst);