From: Jakob Bornecrantz <wallbra...@gmail.com>

In certain conditions when going from different primitive requires
us to flush and validate the different stages. Like smoth lines being
active but first drawing with triangles and then drawing lines.

Reviewed-by: Stéphane Marchesin <marc...@chromium.org>
Tested-by: Stéphane Marchesin <marc...@chromium.org>
---
 src/gallium/auxiliary/draw/draw_pt.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pt.c 
b/src/gallium/auxiliary/draw/draw_pt.c
index d2e2126..403c0f4 100644
--- a/src/gallium/auxiliary/draw/draw_pt.c
+++ b/src/gallium/auxiliary/draw/draw_pt.c
@@ -108,12 +108,15 @@ draw_pt_arrays(struct draw_context *draw,
 
    frontend = draw->pt.frontend;
 
-   if (frontend && (draw->pt.prim != prim ||
-                    draw->pt.opt != opt ||
-                    draw->pt.eltSize != draw->pt.user.eltSize)) {
-      /* XXX: flush only the frontend if eltSize changed */
-      frontend->flush( frontend, DRAW_FLUSH_STATE_CHANGE );
-      frontend = NULL;
+   if (frontend ) {
+      if (draw->pt.prim != prim || draw->pt.opt != opt) {
+         draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
+         frontend = NULL;
+      } else if (draw->pt.eltSize != draw->pt.user.eltSize) {
+         /* XXX: flush only the frontend if eltSize changed */
+         frontend->flush( frontend, DRAW_FLUSH_STATE_CHANGE );
+         frontend = NULL;
+      }
    }
 
    if (!frontend) {
-- 
1.7.6.5

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to