From 5a460c7391ef35b1dcf6ad7f5494fb23279b2e45 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 28 Mar 2008 15:17:50 -0600 Subject: [PATCH] gallium: don't call st_flush_bitmap_cache() if the only change is _NEW_PACKUNPACK state --- src/mesa/state_tracker/st_atom.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c index 40e4142631b..18063adc79c 100644 --- a/src/mesa/state_tracker/st_atom.c +++ b/src/mesa/state_tracker/st_atom.c @@ -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 ); -- 2.30.2