From 93ce4c99d4c4515b8f8c4e999af53c8196b5f9eb Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Sun, 16 Aug 2009 01:29:06 +0200 Subject: nv50: whitespace fixes and deobfuscation --- src/gallium/drivers/nv50/nv50_context.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/gallium/drivers/nv50/nv50_context.c') diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c index e02afc4be9..a2222d88b9 100644 --- a/src/gallium/drivers/nv50/nv50_context.c +++ b/src/gallium/drivers/nv50/nv50_context.c @@ -112,5 +112,3 @@ nv50_create(struct pipe_screen *pscreen, unsigned pctx_id) return &nv50->pipe; } - - -- cgit v1.2.3 From 97cc526eb7ae17c6ec3509a129863ea85f4e8900 Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Sun, 16 Aug 2009 04:06:44 +0200 Subject: nv50: borrow some flushing code from the ddx - This fixes neverball corruption. - I'm unsure about what we're actually flushing here. --- src/gallium/drivers/nv50/nv50_context.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/nv50/nv50_context.c') diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c index a2222d88b9..48f36d6a8b 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 -- cgit v1.2.3 From caf40d5d145185d6a4c3ce8ff7c30ec93c040abd Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Mon, 17 Aug 2009 14:45:50 +0200 Subject: nv50: remove a few cases of directly casting struct pipe_context --- src/gallium/drivers/nv50/nv50_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers/nv50/nv50_context.c') diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c index 48f36d6a8b..6e8f4f9750 100644 --- a/src/gallium/drivers/nv50/nv50_context.c +++ b/src/gallium/drivers/nv50/nv50_context.c @@ -47,7 +47,7 @@ nv50_flush(struct pipe_context *pipe, unsigned flags, static void nv50_destroy(struct pipe_context *pipe) { - struct nv50_context *nv50 = (struct nv50_context *)pipe; + struct nv50_context *nv50 = nv50_context(pipe); draw_destroy(nv50->draw); FREE(nv50); -- cgit v1.2.3