i965: enable polygon offset on sandybridge
authorZhenyu Wang <zhenyuw@linux.intel.com>
Sun, 26 Sep 2010 05:17:18 +0000 (13:17 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 28 Sep 2010 07:58:21 +0000 (15:58 +0800)
Depth offset function is moved to SF stage on sandybridge.

src/mesa/drivers/dri/i965/gen6_sf_state.c

index b598425..a032278 100644 (file)
@@ -87,6 +87,9 @@ upload_sf_state(struct brw_context *brw)
    if ((ctx->Polygon.FrontFace == GL_CCW) ^ render_to_fbo)
       dw2 |= GEN6_SF_WINDING_CCW;
 
+   if (ctx->Polygon.OffsetFill)
+       dw2 |= GEN6_SF_GLOBAL_DEPTH_OFFSET_SOLID;
+
    /* _NEW_SCISSOR */
    if (ctx->Scissor.Enabled)
       dw3 |= GEN6_SF_SCISSOR_ENABLE;