softpipe: Flush draw module before switching framebuffer.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 26 Dec 2009 11:01:05 +0000 (11:01 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 26 Dec 2009 11:01:05 +0000 (11:01 +0000)
Otherwise geometry might end up in the wrong rendertarget.

src/gallium/drivers/softpipe/sp_state_surface.c

index a518248bb1882ed0408ff4b3ce43db4fe73a28aa..f6154109ea831dae4d555249261bd46de91f96f9 100644 (file)
@@ -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]) {