mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
added pipe ptr to draw_context
This commit is contained in:
parent
e3647578d1
commit
a30939714c
2 changed files with 4 additions and 8 deletions
|
|
@ -161,6 +161,8 @@ struct draw_context
|
|||
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:
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -61,9 +61,6 @@
|
|||
#endif
|
||||
|
||||
|
||||
static struct softpipe_context *sp_global = NULL;
|
||||
|
||||
|
||||
|
||||
static INLINE unsigned
|
||||
compute_clipmask(float cx, float cy, float cz, float cw)
|
||||
|
|
@ -104,9 +101,7 @@ run_vertex_program(struct draw_context *draw,
|
|||
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;
|
||||
|
||||
|
|
@ -368,8 +363,6 @@ softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
|||
struct draw_context *draw = sp->draw;
|
||||
struct pipe_buffer_handle *buf;
|
||||
|
||||
sp_global = sp;
|
||||
|
||||
softpipe_map_surfaces(sp);
|
||||
|
||||
/*
|
||||
|
|
@ -384,6 +377,7 @@ softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
|||
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 );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue