Mesa (master): svga: flush drawing before clearing
Brian Paul
brianp at kemper.freedesktop.org
Wed Apr 18 14:40:06 UTC 2012
Module: Mesa
Branch: master
Commit: 8ec18dfc1af43ef1f74c3f28c87e11da815f1958
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ec18dfc1af43ef1f74c3f28c87e11da815f1958
Author: Brian Paul <brianp at vmware.com>
Date: Wed Apr 18 08:31:45 2012 -0600
svga: flush drawing before clearing
We don't normally clear immediately after drawing something. But as it
was, the drawing would incorrectly appear after the clear.
Fixes piglit clear-varray-2.0 failure.
Reviewed-by: José Fonseca <jfonseca at vmware.com>
---
src/gallium/drivers/svga/svga_pipe_clear.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c b/src/gallium/drivers/svga/svga_pipe_clear.c
index 89a66f6..d2fcdd3 100644
--- a/src/gallium/drivers/svga/svga_pipe_clear.c
+++ b/src/gallium/drivers/svga/svga_pipe_clear.c
@@ -115,6 +115,9 @@ svga_clear(struct pipe_context *pipe, unsigned buffers,
SVGA_DBG(DEBUG_DMA, "clear sid %p\n",
svga_surface(svga->curr.framebuffer.cbufs[0])->handle);
+ /* flush any queued prims (don't want them to appear after the clear!) */
+ svga_hwtnl_flush_retry(svga);
+
ret = try_clear( svga, buffers, color, depth, stencil );
if (ret == PIPE_ERROR_OUT_OF_MEMORY) {
More information about the mesa-commit
mailing list