summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-07-11 22:48:11 +1000
committerBen Skeggs <[email protected]>2008-07-11 22:50:10 +1000
commit7c949fb2a2cd4e9b05efd4133e5ae8ea938934d8 (patch)
tree6d0dba17531d2a4004bb7aced82b671864e295dd /src/gallium/drivers/nv50
parent9b0add0be4a3ba7fc72779daf8361d8cd98d9f64 (diff)
nv50: obey do_flip in surface_copy()
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/nv50_surface.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c
index 8d3f1edcfe9..a9daeee3694 100644
--- a/src/gallium/drivers/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nv50/nv50_surface.c
@@ -28,7 +28,7 @@
#include "util/p_tile.h"
static void
-nv50_surface_copy(struct pipe_context *pipe, unsigned flip,
+nv50_surface_copy(struct pipe_context *pipe, boolean flip,
struct pipe_surface *dest, unsigned destx, unsigned desty,
struct pipe_surface *src, unsigned srcx, unsigned srcy,
unsigned width, unsigned height)
@@ -36,8 +36,16 @@ nv50_surface_copy(struct pipe_context *pipe, unsigned flip,
struct nv50_context *nv50 = (struct nv50_context *)pipe;
struct nouveau_winsys *nvws = nv50->screen->nvws;
- nvws->surface_copy(nvws, dest, destx, desty, src, srcx, srcy,
- width, height);
+ if (flip) {
+ desty += height;
+ while (height--) {
+ nvws->surface_copy(nvws, dest, destx, desty--, src,
+ srcx, srcy++, width, 1);
+ }
+ } else {
+ nvws->surface_copy(nvws, dest, destx, desty, src, srcx, srcy,
+ width, height);
+ }
}
static void