gallium: added a flushing_vcache flag, test in draw_do_flush()
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 23 Apr 2008 01:11:59 +0000 (19:11 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 23 Apr 2008 01:11:59 +0000 (19:11 -0600)
Fixes broken polygon stipple, aaline, aapoint stages

src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_private.h
src/gallium/auxiliary/draw/draw_pt_vcache.c

index db92a53ed28432f2dfc30b9365875e164e301e40..f90187816b5a674b7cc2e55c9ce32cd6a4dd0acf 100644 (file)
@@ -367,7 +367,7 @@ draw_set_mapped_element_buffer( struct draw_context *draw,
  */
 void draw_do_flush( struct draw_context *draw, unsigned flags )
 {
-   if (!draw->flushing
+   if (!draw->flushing && !draw->vcache_flushing)
    {
       draw->flushing = TRUE;
 
index 83b81f66a0bb5054258ebb1f0812c04cae9daebc..39aa81b43cf8a017bc18b7aa8cc0e3c3ad3cb62d 100644 (file)
@@ -179,6 +179,7 @@ struct draw_context
    } driver;
 
    boolean flushing;
+   boolean vcache_flushing;
    boolean bypass_clipping;     /* set if either api or driver bypass_clipping true */
 
    /* pipe state that we need: */
index 153055417d528b7e6ec230abd5c30a30fdae8af7..afcff410438d5a30a4a0de9d3461fcd21f8f77c4 100644 (file)
@@ -63,6 +63,7 @@ struct vcache_frontend {
 
 static void vcache_flush( struct vcache_frontend *vcache )
 {
+   vcache->draw->vcache_flushing = TRUE;
    if (vcache->draw_count) {
       vcache->middle->run( vcache->middle,
                            vcache->fetch_elts,
@@ -74,6 +75,7 @@ static void vcache_flush( struct vcache_frontend *vcache )
    memset(vcache->in, ~0, sizeof(vcache->in));
    vcache->fetch_count = 0;
    vcache->draw_count = 0;
+   vcache->draw->vcache_flushing = FALSE;
 }
 
 static void vcache_check_flush( struct vcache_frontend *vcache )