#include "pipe/p_util.h"
#include "draw_context.h"
#include "draw_private.h"
+#include "draw_vbuf.h"
draw->pipeline.rasterize->destroy( draw->pipeline.rasterize );
tgsi_exec_machine_free_data(&draw->machine);
align_free( draw->vs.queue[0].vertex ); /* Frees all the vertices. */
+
+ if (draw->render)
+ draw->render->destroy( draw->render );
+
FREE( draw );
}
draw_vertex_cache_reset_vertex_ids(draw);
}
+
+
+void draw_set_render( struct draw_context *draw,
+ struct vbuf_render *render )
+{
+ draw->render = render;
+}
const unsigned *elts,
unsigned count );
+typedef void (*pt_fetch_func)( struct draw_context *draw,
+ float *out,
+ unsigned start,
+ unsigned count );
+struct vbuf_render;
+
/**
* Private context for the drawing module.
*/
struct draw_stage *rasterize;
} pipeline;
+
+ struct vbuf_render *render;
+
+ /* Support prototype passthrough path:
+ */
+ struct {
+ unsigned prim;
+ unsigned hw_vertex_size;
+ } pt;
+
+
/* pipe state that we need: */
const struct pipe_rasterizer_state *rasterizer;
struct pipe_viewport_state viewport;
fetch_func fetch[PIPE_ATTRIB_MAX];
unsigned nr_attrs;
full_fetch_func fetch_func;
+ pt_fetch_func pt_fetch;
} vertex_fetch;
/* Post-tnl vertex cache:
extern void draw_update_vertex_fetch( struct draw_context *draw );
+/* Prototype/hack
+ */
+boolean
+draw_passthrough_arrays(struct draw_context *draw,
+ unsigned prim,
+ unsigned start,
+ unsigned count);
+
+
#define DRAW_FLUSH_SHADER_QUEUE 0x1 /* sized not to overflow, never raised */
#define DRAW_FLUSH_PRIM_QUEUE 0x2
#define DRAW_FLUSH_VERTEX_CACHE 0x4