summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_atom.c')
-rw-r--r--src/mesa/state_tracker/st_atom.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 0e22a2fa6e..18063adc79 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -32,6 +32,7 @@
#include "pipe/p_defines.h"
#include "st_context.h"
#include "st_atom.h"
+#include "st_cb_bitmap.h"
#include "st_program.h"
@@ -147,6 +148,13 @@ void st_validate_state( struct st_context *st )
struct st_state_flags *state = &st->dirty;
GLuint i;
+ /* 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 );
if (state->st == 0)