summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-05-14 13:04:42 +0100
committerKeith Whitwell <[email protected]>2010-05-14 13:04:42 +0100
commit0bd1cbcd0d28dbadfb0c3e1f8b048a18b56bc72c (patch)
treeb5e83bf73e7fa711579bc3a2e2d0578d3b1c9e11 /src/gallium/drivers/llvmpipe
parentfc4d1b9ba965f26c504e6f5fea12e2bac2d71d72 (diff)
gallium: convert rasterizer state to use gl-style front/back concepts
Use front/back instead of cw/ccw throughout. Also, use offset_point/line/fill instead of offset_cw/ccw. Brings gallium representation of this state into line with its main user, and also what turns out to be the most common hardware representation. This fixes a long-standing bias in the interface towards the architecture of the software rasterizer.
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c10
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_rasterizer.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 53b91690b68..fbbfa3275f3 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -671,14 +671,14 @@ void
lp_setup_choose_triangle( struct lp_setup_context *setup )
{
switch (setup->cullmode) {
- case PIPE_WINDING_NONE:
+ case PIPE_FACE_NONE:
setup->triangle = triangle_both;
break;
- case PIPE_WINDING_CCW:
- setup->triangle = triangle_cw;
+ case PIPE_FACE_FRONT:
+ setup->triangle = setup->ccw_is_frontface ? triangle_ccw : triangle_cw;
break;
- case PIPE_WINDING_CW:
- setup->triangle = triangle_ccw;
+ case PIPE_FACE_BACK:
+ setup->triangle = setup->ccw_is_frontface ? triangle_cw : triangle_ccw;
break;
default:
setup->triangle = triangle_nop;
diff --git a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
index 622eb47ff45..afd3e0b21c9 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
@@ -67,8 +67,8 @@ llvmpipe_bind_rasterizer_state(struct pipe_context *pipe, void *handle)
*/
if (llvmpipe->rasterizer) {
lp_setup_set_triangle_state( llvmpipe->setup,
- llvmpipe->rasterizer->cull_mode,
- llvmpipe->rasterizer->front_winding == PIPE_WINDING_CCW,
+ llvmpipe->rasterizer->cull_face,
+ llvmpipe->rasterizer->front_ccw,
llvmpipe->rasterizer->scissor,
llvmpipe->rasterizer->gl_rasterization_rules);
lp_setup_set_flatshade_first( llvmpipe->setup,