From: Brian Paul Date: Wed, 18 Apr 2012 14:31:45 +0000 (-0600) Subject: svga: flush drawing before clearing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ec18dfc1af43ef1f74c3f28c87e11da815f1958;p=mesa.git 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 --- 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) {