summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyuw@linux.intel.com>2011-01-04 13:46:13 +0800
committerEric Anholt <eric@anholt.net>2011-01-04 13:01:41 -0800
commit1feecbdb00cc838be8c7de0396f8a82707b6f6e8 (patch)
treedd20e6f968acc435d14abff8c765ad58bf7150a4
parent8847205976c73f724d7383577d4f31007ba3aefe (diff)
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 (cherry picked from commit 9977297ad9bc0e816810bd3a39d89e5c1cffff72)
-rw-r--r--src/mesa/drivers/dri/i965/gen6_clip_state.c5
1 files changed, 4 insertions, 1 deletions
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) |