summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
authorMaarten Maathuis <[email protected]>2009-08-16 04:06:44 +0200
committerMaarten Maathuis <[email protected]>2009-08-17 18:48:14 +0200
commit97cc526eb7ae17c6ec3509a129863ea85f4e8900 (patch)
tree71544b6e8e402c7bd13faf7831846aa88d0d97b0 /src/gallium/drivers/nv50
parentf199dbdb76892ec31d19f114f042bc6ec82d9e46 (diff)
nv50: borrow some flushing code from the ddx
- This fixes neverball corruption. - I'm unsure about what we're actually flushing here.
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/nv50_context.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index a2222d88b93..48f36d6a8b5 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -31,9 +31,17 @@ static void
nv50_flush(struct pipe_context *pipe, unsigned flags,
struct pipe_fence_handle **fence)
{
- struct nv50_context *nv50 = (struct nv50_context *)pipe;
-
- FIRE_RING(nv50->screen->base.channel);
+ struct nv50_context *nv50 = nv50_context(pipe);
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct nouveau_grobj *eng2d = nv50->screen->eng2d;
+
+ /* We need this in the ddx for reliable composite, not sure what we're
+ * actually flushing. We generate all our own flushes with flags = 0. */
+ WAIT_RING(chan, 3);
+ BEGIN_RING(chan, eng2d, 0x0110, 1);
+ OUT_RING (chan, 0);
+
+ FIRE_RING(chan);
}
static void