radeon: Flush command buffer on viewport change
authorJerome Glisse <jglisse@redhat.com>
Wed, 17 Jun 2009 14:33:14 +0000 (16:33 +0200)
committerJerome Glisse <jglisse@redhat.com>
Wed, 17 Jun 2009 14:33:14 +0000 (16:33 +0200)
We flush the command buffer so we don't emit mixed
state (with new and previous buffer size) command
buffer, this is especialy affecting zbuffer states.

src/mesa/drivers/dri/radeon/radeon_common.c

index 466eda784efca2d891fa04bb572086890133ec3e..32fe4d5645bb10e2302e1fd4c9876000f9cd4a26 100644 (file)
@@ -861,6 +861,7 @@ void radeon_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei he
        if (!driContext->driScreenPriv->dri2.enabled)
                return;
 
+       radeonFlush(ctx);
        radeon_update_renderbuffers(driContext, driContext->driDrawablePriv);
        if (driContext->driDrawablePriv != driContext->driReadablePriv)
                radeon_update_renderbuffers(driContext, driContext->driReadablePriv);