Fix a FBO render offset bug.

The current code failed if the dri drawable was updated before the call to
intelFlush(), and typically rendered into an FBO using the back buffer
cliprects.
This commit is contained in:
Thomas Hellström 2006-09-13 15:10:09 +00:00
parent 71bce51324
commit 5dbadd418c
2 changed files with 3 additions and 10 deletions

View file

@ -425,15 +425,6 @@ static void
intel_bind_framebuffer(GLcontext * ctx, GLenum target,
struct gl_framebuffer *fb)
{
/*
_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);
/* Integer depth range depends on depth buffer bits */

View file

@ -972,7 +972,9 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
}
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
if (ctx->Driver.Flush) {
ctx->Driver.Flush(ctx);
}
if (framebuffer) {
/* Binding a user-created framebuffer object */
newFb = _mesa_lookup_framebuffer(ctx, framebuffer);