From 3f3059fcc0cfb797830eb5e0755b5b4ec3fd218b Mon Sep 17 00:00:00 2001 From: Zhenyu Wang Date: Sun, 26 Sep 2010 13:17:18 +0800 Subject: [PATCH] i965: enable polygon offset on sandybridge Depth offset function is moved to SF stage on sandybridge. --- src/mesa/drivers/dri/i965/gen6_sf_state.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c index b5984255afa..a0322784685 100644 --- a/src/mesa/drivers/dri/i965/gen6_sf_state.c +++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c @@ -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; -- 2.30.2