Merge remote-tracking branch 'origin/master' into pipe-video
[mesa.git] / src / gallium / drivers / softpipe / sp_state_surface.c
index a518248bb1882ed0408ff4b3ce43db4fe73a28aa..2db6faeca465ae838193f20a33f7b4c19f852781 100644 (file)
 
 #include "sp_context.h"
 #include "sp_state.h"
-#include "sp_surface.h"
 #include "sp_tile_cache.h"
 
 #include "draw/draw_context.h"
 
 #include "util/u_format.h"
+#include "util/u_inlines.h"
 
 
 /**
@@ -51,6 +51,8 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe,
    struct softpipe_context *sp = softpipe_context(pipe);
    uint i;
 
+   draw_flush(sp->draw);
+
    for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
       /* check if changing cbuf */
       if (sp->framebuffer.cbufs[i] != fb->cbufs[i]) {