nv04-nv40: fix nv##_surface_copy() for flipped
authorPekka Paalanen <pq@iki.fi>
Thu, 5 Feb 2009 17:45:33 +0000 (19:45 +0200)
committerPekka Paalanen <pq@iki.fi>
Thu, 5 Feb 2009 18:35:24 +0000 (20:35 +0200)
If do_flipp is true, it would first do the proper copy, height would
wrap around to unsigned maximum, and then it attempts to do another
copy.

Return after doing the proper copy.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
src/gallium/drivers/nv04/nv04_surface.c
src/gallium/drivers/nv10/nv10_surface.c
src/gallium/drivers/nv20/nv20_surface.c
src/gallium/drivers/nv30/nv30_surface.c
src/gallium/drivers/nv40/nv40_surface.c

index 1d11f53..14abf16 100644 (file)
@@ -47,6 +47,7 @@ nv04_surface_copy(struct pipe_context *pipe, boolean do_flip,
                        eng2d->copy(eng2d, dest, destx, desty--, src,
                                    srcx, srcy++, width, 1);
                }
+               return;
        }
 
        eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height);
index 1093dfd..2538151 100644 (file)
@@ -47,6 +47,7 @@ nv10_surface_copy(struct pipe_context *pipe, boolean do_flip,
                        eng2d->copy(eng2d, dest, destx, desty--, src,
                                    srcx, srcy++, width, 1);
                }
+               return;
        }
 
        eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height);
index a79974c..6cd6075 100644 (file)
@@ -47,6 +47,7 @@ nv20_surface_copy(struct pipe_context *pipe, boolean do_flip,
                        eng2d->copy(eng2d, dest, destx, desty--, src,
                                    srcx, srcy++, width, 1);
                }
+               return;
        }
 
        eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height);
index b46b612..0f8dc12 100644 (file)
@@ -47,6 +47,7 @@ nv30_surface_copy(struct pipe_context *pipe, boolean do_flip,
                        eng2d->copy(eng2d, dest, destx, desty--, src,
                                    srcx, srcy++, width, 1);
                }
+               return;
        }
 
        eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height);
index 68bbfce..c4a5fb2 100644 (file)
@@ -47,6 +47,7 @@ nv40_surface_copy(struct pipe_context *pipe, boolean do_flip,
                        eng2d->copy(eng2d, dest, destx, desty--, src,
                                    srcx, srcy++, width, 1);
                }
+               return;
        }
 
        eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height);