From: Zhenyu Wang Date: Tue, 4 Jan 2011 05:46:13 +0000 (+0800) Subject: i965: Fix provoking vertex select in clip state for sandybridge X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9977297ad9bc0e816810bd3a39d89e5c1cffff72;p=mesa.git i965: Fix provoking vertex select in clip state for sandybridge Triangle fan provoking vertex for first convention should be 'vertex 1' in sandybridge clip state. Partly fix glean/clipFlat case --- diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c index c7c4eb1f27d..e25d1bf7879 100644 --- a/src/mesa/drivers/dri/i965/gen6_clip_state.c +++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c @@ -43,7 +43,10 @@ upload_clip_state(struct brw_context *brw) depth_clamp = GEN6_CLIP_Z_TEST; if (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION) { - provoking = 0; + provoking = + (0 << GEN6_CLIP_TRI_PROVOKE_SHIFT) | + (1 << GEN6_CLIP_TRIFAN_PROVOKE_SHIFT) | + (0 << GEN6_CLIP_LINE_PROVOKE_SHIFT); } else { provoking = (2 << GEN6_CLIP_TRI_PROVOKE_SHIFT) |