From 9977297ad9bc0e816810bd3a39d89e5c1cffff72 Mon Sep 17 00:00:00 2001 From: Zhenyu Wang Date: Tue, 4 Jan 2011 13:46:13 +0800 Subject: 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 --- src/mesa/drivers/dri/i965/gen6_clip_state.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) | -- cgit v1.2.3