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 1d11f53f2a15e976934302b0d5413124796cfb7b..14abf166798b08aad4f6509465f7d890ef9cb49a 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 1093dfd62ed90222bbd5dfed60d4d2afa134d398..253815106383871cd48221dc78c05956e7b7b564 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 a79974ce5e487e1892fe31c481cdaa780a73d555..6cd607583cf73b40da957913ea7ed0ddd71a84f5 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 b46b6123cf7285172d3e256e8b8b8c05cb5abd10..0f8dc12045a93eb8462567b263bdda63892ea630 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 68bbfce448b4a11d9e88a6afe2be28116ffdb4a3..c4a5fb20d97c4eb5cae4bfcac7510d82ad7f029a 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);