Esempio n. 1
0
static void run_connections(void)
{
	struct connection *c, *n;

	c = waiting_connections.head;
	while (c) {
		n = c->next;
		run_rconnection(c);
		c = n;
	}
	c = reading_connections.head;
	while (c) {
		n = c->next;
		run_rconnection(c);
		c = n;
	}
	c = writing_connections.head;
	while (c) {
		n = c->next;
		run_wconnection(c);
		c = n;
	}
	c = forked_connections.head;
	while (c) {
		n = c->next;
		pipe_run(c);
		c = n;
	}
}
Esempio n. 2
0
/**
 * Code to run the pipeline on a fairly arbitary collection of vertices.
 * For drawing indexed primitives.
 *
 * Vertex headers must be pre-initialized with the
 * UNDEFINED_VERTEX_ID, this code will cause that id to become
 * overwritten, so it may have to be reset if there is the intention
 * to reuse the vertices.
 *
 * This code provides a callback to reset the vertex id's which the
 * draw_vbuf.c code uses when it has to perform a flush.
 */
void draw_pipeline_run( struct draw_context *draw,
                        unsigned prim,
                        struct vertex_header *vertices,
                        unsigned vertex_count,
                        unsigned stride,
                        const ushort *elts,
                        unsigned count )
{
   char *verts = (char *)vertices;

   draw->pipeline.verts = verts;
   draw->pipeline.vertex_stride = stride;
   draw->pipeline.vertex_count = vertex_count;
   
   pipe_run(draw, prim, vertices, stride, elts, count);
   
   draw->pipeline.verts = NULL;
   draw->pipeline.vertex_count = 0;
}