summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorPatrice Mandin <[email protected]>2008-04-11 21:37:41 +0200
committerPatrice Mandin <[email protected]>2008-04-11 21:37:41 +0200
commit4c498c1b0c38a3ba93649fa4435937d15689bae1 (patch)
tree5b2a20b0fa742af4ec8570b070639be3f3588eef /src/gallium/drivers
parentb1de9c948f9794db97ed7d34b8cbcdccc206ea77 (diff)
nv30: Do flip
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv30/nv30_surface.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv30/nv30_surface.c b/src/gallium/drivers/nv30/nv30_surface.c
index b20a3dd4c15..b22211ac86e 100644
--- a/src/gallium/drivers/nv30/nv30_surface.c
+++ b/src/gallium/drivers/nv30/nv30_surface.c
@@ -42,8 +42,20 @@ nv30_surface_copy(struct pipe_context *pipe, unsigned do_flip,
struct nv30_context *nv30 = nv30_context(pipe);
struct nouveau_winsys *nvws = nv30->nvws;
- nvws->surface_copy(nvws, dest, destx, desty, src, srcx, srcy,
- width, height);
+ if (do_flip) {
+ /*XXX: This dodgyness will do for now for correctness. But,
+ * need to investigate whether the 2D engine is able to
+ * manage a flip (perhaps SIFM?), if not, use the 3D engine
+ */
+ 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