From 8ec18dfc1af43ef1f74c3f28c87e11da815f1958 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 18 Apr 2012 08:31:45 -0600 Subject: [PATCH] svga: flush drawing before clearing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/gallium/drivers/svga/svga_pipe_clear.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c b/src/gallium/drivers/svga/svga_pipe_clear.c index 89a66f65e7c..d2fcdd39868 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) { -- 2.30.2