summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-09 07:54:46 -0700
committerBrian <[email protected]>2007-11-09 07:55:08 -0700
commit193c85ec7a1aec44eebc67c6224fb6ecbb4607a5 (patch)
tree7875bb6e0f32f14d3ed0deffb9bb10ffb5ca3aeb
parent50a56cd755d17e4b754fc019badbda0f113c3065 (diff)
comments, assertions
-rw-r--r--src/mesa/pipe/draw/draw_context.c8
-rw-r--r--src/mesa/pipe/draw/draw_private.h4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c
index 4f6392605ec..e7997180b5b 100644
--- a/src/mesa/pipe/draw/draw_context.c
+++ b/src/mesa/pipe/draw/draw_context.c
@@ -126,7 +126,8 @@ void draw_set_rasterizer_state( struct draw_context *draw,
/**
- * Plug in the primitive rendering/rasterization stage.
+ * Plug in the primitive rendering/rasterization stage (which is the last
+ * stage in the drawing pipeline).
* This is provided by the device driver.
*/
void draw_set_rasterize_stage( struct draw_context *draw,
@@ -230,6 +231,8 @@ draw_set_mapped_feedback_buffer(struct draw_context *draw, uint index,
*/
void draw_alloc_tmps( struct draw_stage *stage, unsigned nr )
{
+ assert(!stage->tmp);
+
stage->nr_tmps = nr;
if (nr) {
@@ -244,7 +247,7 @@ void draw_alloc_tmps( struct draw_stage *stage, unsigned nr )
}
/**
- * Reset the verticies ids of this and subsequent stages.
+ * Reset the vertex ids for the stage's temp verts.
*/
void draw_reset_tmps( struct draw_stage *stage )
{
@@ -260,6 +263,7 @@ void draw_free_tmps( struct draw_stage *stage )
if (stage->tmp) {
FREE( stage->tmp[0] );
FREE( stage->tmp );
+ stage->tmp = NULL;
}
}
diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h
index 03b48aa93ce..09acf69623b 100644
--- a/src/mesa/pipe/draw/draw_private.h
+++ b/src/mesa/pipe/draw/draw_private.h
@@ -100,7 +100,7 @@ struct draw_stage
struct draw_stage *next; /**< next stage in pipeline */
- struct vertex_header **tmp;
+ struct vertex_header **tmp; /**< temp vert storage, such as for clipping */
unsigned nr_tmps;
void (*begin)( struct draw_stage * );
@@ -117,7 +117,7 @@ struct draw_stage
void (*end)( struct draw_stage * );
/**
- * Reset temporary vertices ids in this stage
+ * Reset temporary vertex ids in this stage
*
* draw_free_tmps will be called instead if null.
*/