gallium: don't call st_flush_bitmap_cache() if the only change is _NEW_PACKUNPACK...
authorBrian <brian.paul@tungstengraphics.com>
Fri, 28 Mar 2008 21:17:50 +0000 (15:17 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Fri, 28 Mar 2008 21:17:50 +0000 (15:17 -0600)
src/mesa/state_tracker/st_atom.c

index 40e4142..18063ad 100644 (file)
@@ -148,7 +148,12 @@ void st_validate_state( struct st_context *st )
    struct st_state_flags *state = &st->dirty;
    GLuint i;
 
-   st_flush_bitmap_cache(st);
+   /* The bitmap cache is immune to pixel unpack changes.
+    * Note that GLUT makes several calls to glPixelStore for each
+    * bitmap char it draws so this is an important check.
+    */
+   if (state->mesa & ~_NEW_PACKUNPACK)
+      st_flush_bitmap_cache(st);
 
    check_program_state( st );