summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/draw
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2007-09-17 12:59:50 -0400
committerZack Rusin <[email protected]>2007-09-18 07:18:12 -0400
commit294401814d1d89cc731de1c22c25333aa5d59374 (patch)
treec392643aaed3660fe9d577044b3f928fb50c4ac7 /src/mesa/pipe/draw
parentd6ac959833a8e40a27907940969c622692f749b1 (diff)
converting the setup state to immutable object and renaming it to rasterizer state
Diffstat (limited to 'src/mesa/pipe/draw')
-rw-r--r--src/mesa/pipe/draw/draw_context.c16
-rw-r--r--src/mesa/pipe/draw/draw_context.h2
-rw-r--r--src/mesa/pipe/draw/draw_cull.c2
-rw-r--r--src/mesa/pipe/draw/draw_offset.c4
-rw-r--r--src/mesa/pipe/draw/draw_private.h2
-rw-r--r--src/mesa/pipe/draw/draw_twoside.c2
-rw-r--r--src/mesa/pipe/draw/draw_unfilled.c4
7 files changed, 16 insertions, 16 deletions
diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c
index 4498293e92b..f3236ad59e1 100644
--- a/src/mesa/pipe/draw/draw_context.c
+++ b/src/mesa/pipe/draw/draw_context.c
@@ -98,19 +98,19 @@ static void validate_pipeline( struct draw_context *draw )
* shorter pipelines for lines & points.
*/
- if (draw->setup.fill_cw != PIPE_POLYGON_MODE_FILL ||
- draw->setup.fill_ccw != PIPE_POLYGON_MODE_FILL) {
+ if (draw->rasterizer->fill_cw != PIPE_POLYGON_MODE_FILL ||
+ draw->rasterizer->fill_ccw != PIPE_POLYGON_MODE_FILL) {
draw->pipeline.unfilled->next = next;
next = draw->pipeline.unfilled;
}
- if (draw->setup.offset_cw ||
- draw->setup.offset_ccw) {
+ if (draw->rasterizer->offset_cw ||
+ draw->rasterizer->offset_ccw) {
draw->pipeline.offset->next = next;
next = draw->pipeline.offset;
}
- if (draw->setup.light_twoside) {
+ if (draw->rasterizer->light_twoside) {
draw->pipeline.twoside->next = next;
next = draw->pipeline.twoside;
}
@@ -134,7 +134,7 @@ static void validate_pipeline( struct draw_context *draw )
* this for clipped primitives, ie it is a part of the clip
* routine.
*/
- if (draw->setup.flatshade) {
+ if (draw->rasterizer->flatshade) {
draw->pipeline.flatshade->next = next;
next = draw->pipeline.flatshade;
}
@@ -161,9 +161,9 @@ void draw_set_feedback_state( struct draw_context *draw,
* This causes the drawing pipeline to be rebuilt.
*/
void draw_set_setup_state( struct draw_context *draw,
- const struct pipe_setup_state *setup )
+ const struct pipe_rasterizer_state *raster )
{
- draw->setup = *setup; /* struct copy */
+ draw->rasterizer = raster;
validate_pipeline( draw );
}
diff --git a/src/mesa/pipe/draw/draw_context.h b/src/mesa/pipe/draw/draw_context.h
index 2babc02f45f..2714252fc5d 100644
--- a/src/mesa/pipe/draw/draw_context.h
+++ b/src/mesa/pipe/draw/draw_context.h
@@ -87,7 +87,7 @@ void draw_set_feedback_state( struct draw_context *draw,
const struct pipe_feedback_state * );
void draw_set_setup_state( struct draw_context *draw,
- const struct pipe_setup_state *setup );
+ const struct pipe_rasterizer_state *raster );
void draw_set_setup_stage( struct draw_context *draw,
struct draw_stage *stage );
diff --git a/src/mesa/pipe/draw/draw_cull.c b/src/mesa/pipe/draw/draw_cull.c
index f3d56ad7197..f898834ba5d 100644
--- a/src/mesa/pipe/draw/draw_cull.c
+++ b/src/mesa/pipe/draw/draw_cull.c
@@ -54,7 +54,7 @@ static void cull_begin( struct draw_stage *stage )
{
struct cull_stage *cull = cull_stage(stage);
- cull->winding = stage->draw->setup.cull_mode;
+ cull->winding = stage->draw->rasterizer->cull_mode;
stage->next->begin( stage->next );
}
diff --git a/src/mesa/pipe/draw/draw_offset.c b/src/mesa/pipe/draw/draw_offset.c
index 4f653e8c542..6acc7cbcd29 100644
--- a/src/mesa/pipe/draw/draw_offset.c
+++ b/src/mesa/pipe/draw/draw_offset.c
@@ -57,8 +57,8 @@ static void offset_begin( struct draw_stage *stage )
struct offset_stage *offset = offset_stage(stage);
float mrd = 1.0f / 65535.0f; /* XXX this depends on depthbuffer bits! */
- offset->units = stage->draw->setup.offset_units * mrd;
- offset->scale = stage->draw->setup.offset_scale;
+ offset->units = stage->draw->rasterizer->offset_units * mrd;
+ offset->scale = stage->draw->rasterizer->offset_scale;
stage->next->begin( stage->next );
}
diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h
index 8bcc3717c45..fb0aaff40d7 100644
--- a/src/mesa/pipe/draw/draw_private.h
+++ b/src/mesa/pipe/draw/draw_private.h
@@ -137,7 +137,7 @@ struct draw_context
} pipeline;
/* pipe state that we need: */
- struct pipe_setup_state setup;
+ const struct pipe_rasterizer_state *rasterizer;
struct pipe_feedback_state feedback;
struct pipe_viewport_state viewport;
struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX];
diff --git a/src/mesa/pipe/draw/draw_twoside.c b/src/mesa/pipe/draw/draw_twoside.c
index 98eb088035a..3eb8cce6376 100644
--- a/src/mesa/pipe/draw/draw_twoside.c
+++ b/src/mesa/pipe/draw/draw_twoside.c
@@ -55,7 +55,7 @@ static void twoside_begin( struct draw_stage *stage )
* if the triangle is back-facing (negative).
* sign = -1 for CCW, +1 for CW
*/
- twoside->sign = (stage->draw->setup.front_winding == PIPE_WINDING_CCW) ? -1.0f : 1.0f;
+ twoside->sign = (stage->draw->rasterizer->front_winding == PIPE_WINDING_CCW) ? -1.0f : 1.0f;
stage->next->begin( stage->next );
}
diff --git a/src/mesa/pipe/draw/draw_unfilled.c b/src/mesa/pipe/draw/draw_unfilled.c
index b0d6f3d0655..2d374329d83 100644
--- a/src/mesa/pipe/draw/draw_unfilled.c
+++ b/src/mesa/pipe/draw/draw_unfilled.c
@@ -59,8 +59,8 @@ static void unfilled_begin( struct draw_stage *stage )
{
struct unfilled_stage *unfilled = unfilled_stage(stage);
- unfilled->mode[0] = stage->draw->setup.fill_ccw; /* front */
- unfilled->mode[1] = stage->draw->setup.fill_cw; /* back */
+ unfilled->mode[0] = stage->draw->rasterizer->fill_ccw; /* front */
+ unfilled->mode[1] = stage->draw->rasterizer->fill_cw; /* back */
stage->next->begin( stage->next );
}