radeon: update clear state with latest intel code
authorDave Airlie <airlied@linux.ie>
Sun, 19 Apr 2009 12:04:42 +0000 (22:04 +1000)
committerDave Airlie <airlied@linux.ie>
Sun, 19 Apr 2009 12:04:42 +0000 (22:04 +1000)
src/mesa/drivers/dri/radeon/radeon_common.c

index 2449795ea940efd5cdd4937d43fac08bf4c5b822..dc281ee269cd97c1a4e70534282adf2eb7d699aa 100644 (file)
@@ -1258,6 +1258,7 @@ void radeon_clear_tris(GLcontext *ctx, GLbitfield mask)
                    GL_CURRENT_BIT |
                    GL_DEPTH_BUFFER_BIT |
                    GL_ENABLE_BIT |
+                   GL_POLYGON_BIT |
                    GL_STENCIL_BUFFER_BIT |
                    GL_TRANSFORM_BIT |
                    GL_CURRENT_BIT);
@@ -1279,6 +1280,7 @@ void radeon_clear_tris(GLcontext *ctx, GLbitfield mask)
    _mesa_Disable(GL_CLIP_PLANE3);
    _mesa_Disable(GL_CLIP_PLANE4);
    _mesa_Disable(GL_CLIP_PLANE5);
+   _mesa_PolygonMode(GL_FRONT_AND_BACK, GL_FILL);
    if (ctx->Extensions.ARB_fragment_program && ctx->FragmentProgram.Enabled) {
       saved_fp_enable = GL_TRUE;
       _mesa_Disable(GL_FRAGMENT_PROGRAM_ARB);
@@ -1311,6 +1313,11 @@ void radeon_clear_tris(GLcontext *ctx, GLbitfield mask)
       }
    }
   
+#if FEATURE_ARB_vertex_buffer_object
+   _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
+   _mesa_BindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
+#endif
+
    radeon_meta_set_passthrough_transform(rmesa);
    
    for (i = 0; i < 4; i++) {