[Mesa-dev] glFinish Patch 3 of 3 - Mesa

Bob Gleitsmann rjgleits at bellsouth.net
Sat Jan 1 13:52:33 PST 2011


diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c 
b/src/gallium/drivers/nouveau/nouveau_screen.c
index a9426df..0918537 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -166,7 +166,8 @@ nouveau_screen_fence_finish(struct pipe_screen *screen,
 			    struct pipe_fence_handle *pfence,
 			    unsigned flags)
 {
-	return 0;
+	struct nouveau_screen *ns = nouveau_screen(screen);
+	return nouveau_channel_wait(ns->channel);
 }
 
 
diff --git a/src/gallium/drivers/nvfx/nvfx_context.c 
b/src/gallium/drivers/nvfx/nvfx_context.c
index 6c8934d..046ad84 100644
--- a/src/gallium/drivers/nvfx/nvfx_context.c
+++ b/src/gallium/drivers/nvfx/nvfx_context.c
@@ -24,8 +24,11 @@ nvfx_flush(struct pipe_context *pipe, unsigned flags,
 	}
 
 	FIRE_RING(chan);
+/* Gallium only checks if *fence is non-zero on return. fence here is null 
when called
+ * from glFlush, non-null when called from glFinish. The real fence lives 
only in the kernel.
+ */
 	if (fence)
-		*fence = NULL;
+		*fence = 1;
 }
 
 static void


More information about the mesa-dev mailing list