r300: Remove calls to rcommonEnsureCmdBufSpace.
[mesa.git] / src / mesa / drivers / dri / r300 / r300_state.c
index f39d7460b20d7e7f99ef7abaa34673d5b12992ae..4fe9175b61d883b7fa322a54ac331a282e747238 100644 (file)
@@ -371,6 +371,7 @@ static void r300ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
        p = (GLint) plane - (GLint) GL_CLIP_PLANE0;
        ip = (GLint *)ctx->Transform._ClipUserPlane[p];
 
+       R300_STATECHANGE( rmesa, vap_flush );
        R300_STATECHANGE( rmesa, vpucp[p] );
        rmesa->hw.vpucp[p].cmd[R300_VPUCP_X] = ip[0];
        rmesa->hw.vpucp[p].cmd[R300_VPUCP_Y] = ip[1];
@@ -462,7 +463,7 @@ static GLboolean current_fragment_program_writes_depth(GLcontext* ctx)
 static void r300SetEarlyZState(GLcontext * ctx)
 {
        r300ContextPtr r300 = R300_CONTEXT(ctx);
-       GLuint topZ = R300_ZTOP_DISABLE;
+       GLuint topZ = R300_ZTOP_ENABLE;
        GLuint w_fmt, fgdepthsrc;
 
        if (ctx->Color.AlphaEnabled && ctx->Color.AlphaFunc != GL_ALWAYS)
@@ -471,6 +472,8 @@ static void r300SetEarlyZState(GLcontext * ctx)
                topZ = R300_ZTOP_DISABLE;
        else if (ctx->FragmentProgram._Current && ctx->FragmentProgram._Current->UsesKill)
                topZ = R300_ZTOP_DISABLE;
+       else if (r300->radeon.query.current)
+               topZ = R300_ZTOP_DISABLE;
 
        if (topZ != r300->hw.zstencil_format.cmd[2]) {
                /* Note: This completely reemits the stencil format.