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 a35db0e..4a09810 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 98367ac..1729ea2 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 3e3736b..62d75bc 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);