summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv04/nv04_surface.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2009-02-05 18:19:32 +1000
committerBen Skeggs <skeggsb@gmail.com>2009-02-05 18:22:41 +1000
commitff8dff017e537c6db4c86aad43e92b768cb187e4 (patch)
tree984360ac7447dd5d889628ffef995d821ed8f442 /src/gallium/drivers/nv04/nv04_surface.c
parent13393736dbab1087589f8dd788bc412d16b431d1 (diff)
nv04-nv40: move 2d blit/fill code into pipe driver
Diffstat (limited to 'src/gallium/drivers/nv04/nv04_surface.c')
-rw-r--r--src/gallium/drivers/nv04/nv04_surface.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv04/nv04_surface.c b/src/gallium/drivers/nv04/nv04_surface.c
index 0d0983f9d4..1d11f53f2a 100644
--- a/src/gallium/drivers/nv04/nv04_surface.c
+++ b/src/gallium/drivers/nv04/nv04_surface.c
@@ -39,10 +39,17 @@ nv04_surface_copy(struct pipe_context *pipe, boolean do_flip,
unsigned width, unsigned height)
{
struct nv04_context *nv04 = nv04_context(pipe);
- struct nouveau_winsys *nvws = nv04->nvws;
+ struct nv04_surface_2d *eng2d = nv04->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);
+ }
+ }
+
+ eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height);
}
static void
@@ -51,9 +58,9 @@ nv04_surface_fill(struct pipe_context *pipe, struct pipe_surface *dest,
unsigned height, unsigned value)
{
struct nv04_context *nv04 = nv04_context(pipe);
- struct nouveau_winsys *nvws = nv04->nvws;
+ struct nv04_surface_2d *eng2d = nv04->screen->eng2d;
- nvws->surface_fill(nvws, dest, destx, desty, width, height, value);
+ eng2d->fill(eng2d, dest, destx, desty, width, height, value);
}
void