summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-05-21 15:41:06 +0100
committerKeith Whitwell <[email protected]>2010-05-21 15:41:06 +0100
commitef9b4d20d78a748e653a61286d83f33dc6c46184 (patch)
tree19c9c63de1ceeed4b2615ea5bd451f2e590b1018 /src/gallium/drivers/i915
parent0293b1abf54d0f262c3fe84ab9a3b5c525a95009 (diff)
parent0ff2373131011cf3d7dec737aa4ef5f54d2b7ba5 (diff)
Merge branch 'gallium-front-ccw'
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r--src/gallium/drivers/i915/i915_state.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index f883883852a..cd963e4df75 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -686,17 +686,23 @@ i915_create_rasterizer_state(struct pipe_context *pipe,
else
cso->sc[0] = _3DSTATE_SCISSOR_ENABLE_CMD | DISABLE_SCISSOR_RECT;
- switch (rasterizer->cull_mode) {
- case PIPE_WINDING_NONE:
+ switch (rasterizer->cull_face) {
+ case PIPE_FACE_NONE:
cso->LIS4 |= S4_CULLMODE_NONE;
break;
- case PIPE_WINDING_CW:
- cso->LIS4 |= S4_CULLMODE_CW;
+ case PIPE_FACE_FRONT:
+ if (rasterizer->front_ccw)
+ cso->LIS4 |= S4_CULLMODE_CCW;
+ else
+ cso->LIS4 |= S4_CULLMODE_CW;
break;
- case PIPE_WINDING_CCW:
- cso->LIS4 |= S4_CULLMODE_CCW;
+ case PIPE_FACE_BACK:
+ if (rasterizer->front_ccw)
+ cso->LIS4 |= S4_CULLMODE_CW;
+ else
+ cso->LIS4 |= S4_CULLMODE_CCW;
break;
- case PIPE_WINDING_BOTH:
+ case PIPE_FACE_FRONT_AND_BACK:
cso->LIS4 |= S4_CULLMODE_BOTH;
break;
}