summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_framebuffer.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-07-22 04:31:59 +0200
committerMarek Olšák <[email protected]>2012-07-23 19:23:53 +0200
commit162b3ad94d52b28d83462202952987012387e12f (patch)
treec75bbb96b10807a632e9749fe21ca9104412745b /src/mesa/state_tracker/st_atom_framebuffer.c
parent07b9b3c37b33e4994ff71930aed77821e758f0c9 (diff)
st/mesa: flush the glBitmap cache before changing framebuffer state
This fixes the piglit EXT_framebuffer_multisample/bitmap tests. Note that we must not rely on ctx->DrawBuffer when flushing the cache, because that's already updated with a new framebuffer. We want to draw into the old framebuffer where glBitmap was called. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_atom_framebuffer.c')
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c
index a8907c1577a..6f94a47c6b5 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -33,6 +33,7 @@
#include "st_context.h"
#include "st_atom.h"
+#include "st_cb_bitmap.h"
#include "st_cb_fbo.h"
#include "st_texture.h"
#include "pipe/p_context.h"
@@ -103,6 +104,9 @@ update_framebuffer_state( struct st_context *st )
struct st_renderbuffer *strb;
GLuint i;
+ st_flush_bitmap_cache(st);
+
+ st->state.fb_orientation = st_fb_orientation(fb);
framebuffer->width = fb->Width;
framebuffer->height = fb->Height;