const struct pipe_vertex_buffer *vertex_buffer; /**< note: pointer */
const struct pipe_vertex_element *vertex_element; /**< note: pointer */
+ /** need to know the pipe for vertex flushing/transformation: */
+ struct pipe_context *pipe;
/* Clip derived state:
*/
#endif
-static struct softpipe_context *sp_global = NULL;
-
-
static INLINE unsigned
compute_clipmask(float cx, float cy, float cz, float cw)
const void *vbuffer, unsigned elts[4], unsigned count,
struct vertex_header *vOut[])
{
-#if 1
- struct softpipe_context *sp = sp_global;
-#endif
+ struct softpipe_context *sp = softpipe_context(draw->pipe);
struct tgsi_exec_machine machine;
unsigned int j;
struct draw_context *draw = sp->draw;
struct pipe_buffer_handle *buf;
- sp_global = sp;
-
softpipe_map_surfaces(sp);
/*
draw->pipeline.first->begin( draw->pipeline.first );
draw->vs_flush = vs_flush;
+ draw->pipe = pipe; /* XXX pass pipe to draw_create() */
draw_invalidate_vcache( draw );