summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
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/auxiliary/util
parent0293b1abf54d0f262c3fe84ab9a3b5c525a95009 (diff)
parent0ff2373131011cf3d7dec737aa4ef5f54d2b7ba5 (diff)
Merge branch 'gallium-front-ccw'
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_blit.c3
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c3
-rw-r--r--src/gallium/auxiliary/util/u_dump_state.c13
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c3
-rw-r--r--src/gallium/auxiliary/util/u_inlines.h18
5 files changed, 28 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 */
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index a48689ee8be..540305c1465 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -369,6 +369,24 @@ pipe_transfer_destroy( struct pipe_context *context,
}
+static INLINE boolean util_get_offset(
+ const struct pipe_rasterizer_state *templ,
+ unsigned fill_mode)
+{
+ switch(fill_mode) {
+ case PIPE_POLYGON_MODE_POINT:
+ return templ->offset_point;
+ case PIPE_POLYGON_MODE_LINE:
+ return templ->offset_line;
+ case PIPE_POLYGON_MODE_FILL:
+ return templ->offset_tri;
+ default:
+ assert(0);
+ return FALSE;
+ }
+}
+
+
#ifdef __cplusplus
}
#endif