tgsi: reduce repetition of structure name in its members
[mesa.git] / src / gallium / auxiliary / draw / draw_pipe.h
index 5b97ca5c8cf34986d6946d5061330bc0177a30e2..479250729ff7ac350a38d3c2e87056a7df033d29 100644 (file)
 #include "draw_private.h"       /* for sizeof(vertex_header) */
 
 
+/**
+ * Basic info for a point/line/triangle primitive.
+ */
+struct prim_header {
+   float det;                 /**< front/back face determinant */
+   ushort flags;
+   ushort pad;
+   struct vertex_header *v[3];  /**< 1 to 3 vertex pointers */
+};
+
+
 
 /**
  * Base class for all primitive drawing stages.
@@ -46,6 +57,7 @@ struct draw_stage
    struct draw_context *draw;   /**< parent context */
 
    struct draw_stage *next;     /**< next stage in pipeline */
+   const char *name;            /**< for debugging  */
 
    struct vertex_header **tmp;  /**< temp vert storage, such as for clipping */
    unsigned nr_tmps;
@@ -81,9 +93,13 @@ extern struct draw_stage *draw_validate_stage( struct draw_context *context );
 
 
 extern void draw_free_temp_verts( struct draw_stage *stage );
+extern boolean draw_alloc_temp_verts( struct draw_stage *stage, unsigned nr );
 
-extern void draw_alloc_temp_verts( struct draw_stage *stage, unsigned nr );
+extern void draw_reset_vertex_ids( struct draw_context *draw );
 
+void draw_pipe_passthrough_tri(struct draw_stage *stage, struct prim_header *header);
+void draw_pipe_passthrough_line(struct draw_stage *stage, struct prim_header *header);
+void draw_pipe_passthrough_point(struct draw_stage *stage, struct prim_header *header);
 
 
 
@@ -101,7 +117,7 @@ dup_vert( struct draw_stage *stage,
 {   
    struct vertex_header *tmp = stage->tmp[idx];
    const uint vsize = sizeof(struct vertex_header)
-      + stage->draw->num_vs_outputs * 4 * sizeof(float);
+      + stage->draw->vs.num_vs_outputs * 4 * sizeof(float);
    memcpy(tmp, vert, vsize);
    tmp->vertex_id = UNDEFINED_VERTEX_ID;
    return tmp;