summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-03-23 22:33:58 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-03-23 22:33:58 +0000
commita8c2344364de0e81e2befe0e3157e1e4b7baf5ef (patch)
tree67af3c589fe16a95109cf1295129c0343b92a979
parent2929b2569bc9d5a0b074753082de4f6baa76eb63 (diff)
Added an intelFlush() call inside intel_bind_framebuffer() to be sure
any previous rendering is completed. Not sure why this is needed when _mesa_BindFramebufferEXT() does a FLUSH_VERTICES() call. This fixes an offset/wrap-around bug when rendering to FBOs.
-rw-r--r--src/mesa/drivers/dri/i915/intel_fbo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_fbo.c b/src/mesa/drivers/dri/i915/intel_fbo.c
index 02db59d358..1578ad67c1 100644
--- a/src/mesa/drivers/dri/i915/intel_fbo.c
+++ b/src/mesa/drivers/dri/i915/intel_fbo.c
@@ -444,6 +444,11 @@ intel_bind_framebuffer(GLcontext *ctx, GLenum target,
/*
_mesa_debug(ctx, "%s %d\n", __FUNCTION__, fb->Name);
*/
+ /* XXX FBO: putting this flush here fixes a rendering offset bug.
+ * Not sure why this is needed when _mesa_BindFrameBuffer does
+ * a FLUSH_VERTICES().
+ */
+ intelFlush(ctx);
if (target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER_EXT) {
intel_draw_buffer(ctx, fb);