diff options
author | Keith Whitwell <[email protected]> | 2010-05-14 13:04:42 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2010-05-14 13:04:42 +0100 |
commit | 0bd1cbcd0d28dbadfb0c3e1f8b048a18b56bc72c (patch) | |
tree | b5e83bf73e7fa711579bc3a2e2d0578d3b1c9e11 /src/gallium/auxiliary/util | |
parent | fc4d1b9ba965f26c504e6f5fea12e2bac2d71d72 (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/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_blit.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_dump_state.c | 13 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_gen_mipmap.c | 3 |
4 files changed, 10 insertions, 12 deletions
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c index e3b7839a92a..f6f6e481d94 100644 --- a/src/gallium/auxiliary/util/u_blit.c +++ b/src/gallium/auxiliary/util/u_blit.c @@ -101,8 +101,7 @@ util_create_blit(struct pipe_context *pipe, struct cso_context *cso) /* rasterizer */ memset(&ctx->rasterizer, 0, sizeof(ctx->rasterizer)); - ctx->rasterizer.front_winding = PIPE_WINDING_CW; - ctx->rasterizer.cull_mode = PIPE_WINDING_NONE; + ctx->rasterizer.cull_face = PIPE_FACE_NONE; ctx->rasterizer.gl_rasterization_rules = 1; /* samplers */ diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 157b3853e45..3a7c4db6f34 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -175,8 +175,7 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe) /* rasterizer state */ memset(&rs_state, 0, sizeof(rs_state)); - rs_state.front_winding = PIPE_WINDING_CW; - rs_state.cull_mode = PIPE_WINDING_NONE; + rs_state.cull_face = PIPE_FACE_NONE; rs_state.gl_rasterization_rules = 1; rs_state.flatshade = 1; ctx->rs_state = pipe->create_rasterizer_state(pipe, &rs_state); diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c index 2ce643e90cd..cda5b8ba512 100644 --- a/src/gallium/auxiliary/util/u_dump_state.c +++ b/src/gallium/auxiliary/util/u_dump_state.c @@ -300,12 +300,13 @@ util_dump_rasterizer_state(struct os_stream *stream, const struct pipe_rasterize util_dump_member(stream, bool, state, flatshade); util_dump_member(stream, bool, state, light_twoside); - util_dump_member(stream, uint, state, front_winding); - util_dump_member(stream, uint, state, cull_mode); - util_dump_member(stream, uint, state, fill_cw); - util_dump_member(stream, uint, state, fill_ccw); - util_dump_member(stream, bool, state, offset_cw); - util_dump_member(stream, bool, state, offset_ccw); + util_dump_member(stream, uint, state, front_ccw); + util_dump_member(stream, uint, state, cull_face); + util_dump_member(stream, uint, state, fill_front); + util_dump_member(stream, uint, state, fill_back); + util_dump_member(stream, bool, state, offset_point); + util_dump_member(stream, bool, state, offset_line); + util_dump_member(stream, bool, state, offset_tri); util_dump_member(stream, bool, state, scissor); util_dump_member(stream, bool, state, poly_smooth); util_dump_member(stream, bool, state, poly_stipple_enable); diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c index eee6030ddcc..1553e08d6ce 100644 --- a/src/gallium/auxiliary/util/u_gen_mipmap.c +++ b/src/gallium/auxiliary/util/u_gen_mipmap.c @@ -1295,8 +1295,7 @@ util_create_gen_mipmap(struct pipe_context *pipe, /* rasterizer */ memset(&ctx->rasterizer, 0, sizeof(ctx->rasterizer)); - ctx->rasterizer.front_winding = PIPE_WINDING_CW; - ctx->rasterizer.cull_mode = PIPE_WINDING_NONE; + ctx->rasterizer.cull_face = PIPE_FACE_NONE; ctx->rasterizer.gl_rasterization_rules = 1; /* sampler state */ |