summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv20/nv20_surface.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-02-16 19:50:48 +0000
committerKeith Whitwell <keithw@vmware.com>2009-02-16 19:50:48 +0000
commit59d54334c96f44ed1d8bf660dc96221362a77d04 (patch)
treee9ab34e568256bcdc2a88602c47072ab769211e8 /src/gallium/drivers/nv20/nv20_surface.c
parent7c8836e9ef49d938aa55a1c385b95c6371c301f1 (diff)
parentc5c383596ddb26cd75e4b355918ad16915283b59 (diff)
Merge branch 'master' into gallium-texture-transfer
Conflicts: src/mesa/state_tracker/st_cb_accum.c src/mesa/state_tracker/st_cb_drawpixels.c
Diffstat (limited to 'src/gallium/drivers/nv20/nv20_surface.c')
-rw-r--r--src/gallium/drivers/nv20/nv20_surface.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv20/nv20_surface.c b/src/gallium/drivers/nv20/nv20_surface.c
index 9b4c028eae..6cd607583c 100644
--- a/src/gallium/drivers/nv20/nv20_surface.c
+++ b/src/gallium/drivers/nv20/nv20_surface.c
@@ -39,10 +39,18 @@ nv20_surface_copy(struct pipe_context *pipe, boolean do_flip,
unsigned width, unsigned height)
{
struct nv20_context *nv20 = nv20_context(pipe);
- struct nouveau_winsys *nvws = nv20->nvws;
+ struct nv04_surface_2d *eng2d = nv20->screen->eng2d;
- nvws->surface_copy(nvws, dest, destx, desty, src, srcx, srcy,
- width, height);
+ if (do_flip) {
+ desty += height;
+ while (height--) {
+ eng2d->copy(eng2d, dest, destx, desty--, src,
+ srcx, srcy++, width, 1);
+ }
+ return;
+ }
+
+ eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height);
}
static void
@@ -51,9 +59,9 @@ nv20_surface_fill(struct pipe_context *pipe, struct pipe_surface *dest,
unsigned height, unsigned value)
{
struct nv20_context *nv20 = nv20_context(pipe);
- struct nouveau_winsys *nvws = nv20->nvws;
+ struct nv04_surface_2d *eng2d = nv20->screen->eng2d;
- nvws->surface_fill(nvws, dest, destx, desty, width, height, value);
+ eng2d->fill(eng2d, dest, destx, desty, width, height, value);
}
void