diff options
author | Ben Skeggs <[email protected]> | 2008-03-25 12:57:36 +1100 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2008-03-25 12:58:57 +1100 |
commit | ce64778ed1f436d81178862dc0032dfd16b4b7de (patch) | |
tree | 98ed015683a616722316d5cf9dc3ab62fa49561e /src/gallium/drivers | |
parent | 9e1f7b2c57154704d5881362a44da703b7a4a00f (diff) |
nv40: respect do_flip in surface_copy()
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nv40/nv40_surface.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv40/nv40_surface.c b/src/gallium/drivers/nv40/nv40_surface.c index e8a60116964..c0d135eb36d 100644 --- a/src/gallium/drivers/nv40/nv40_surface.c +++ b/src/gallium/drivers/nv40/nv40_surface.c @@ -42,8 +42,20 @@ nv40_surface_copy(struct pipe_context *pipe, unsigned do_flip, struct nv40_context *nv40 = nv40_context(pipe); struct nouveau_winsys *nvws = nv40->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 |