softpipe: set dirty_render_cache in softpipe_clear()
authorBrian Paul <brianp@vmware.com>
Thu, 10 Sep 2009 20:11:36 +0000 (14:11 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 10 Sep 2009 20:11:41 +0000 (14:11 -0600)
This fixes a bug seen when doing a glDrawPixels(GL_STENCIL_INDEX) right
after a glClear().  The check-for-flush test was failing because we
didn't set the dirty_render_cache flag in softpipe_clear().  So we saw
stale data when we mapped the stencil buffer.

src/gallium/drivers/softpipe/sp_clear.c

index fa59277438c91e050485b7a6964183b8dbdd3c46..bc8f9196954cfb40a92dcf12cea2c7cf135ef1d9 100644 (file)
@@ -86,4 +86,6 @@ softpipe_clear(struct pipe_context *pipe, unsigned buffers, const float *rgba,
       pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, cv);
 #endif
       }
+
+   softpipe->dirty_render_cache = TRUE;
 }