summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/draw/draw_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/draw/draw_context.c')
-rw-r--r--src/mesa/pipe/draw/draw_context.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c
index 3c095810e55..4498293e92b 100644
--- a/src/mesa/pipe/draw/draw_context.c
+++ b/src/mesa/pipe/draw/draw_context.c
@@ -48,6 +48,7 @@ struct draw_context *draw_create( void )
draw->pipeline.clip = draw_clip_stage( draw );
draw->pipeline.flatshade = draw_flatshade_stage( draw );
draw->pipeline.cull = draw_cull_stage( draw );
+ draw->pipeline.feedback = draw_feedback_stage( draw );
ASSIGN_4V( draw->plane[0], -1, 0, 0, 1 );
ASSIGN_4V( draw->plane[1], 1, 0, 0, 1 );
@@ -147,6 +148,14 @@ static void validate_pipeline( struct draw_context *draw )
}
+void draw_set_feedback_state( struct draw_context *draw,
+ const struct pipe_feedback_state *feedback )
+{
+ draw->feedback = *feedback;
+ validate_pipeline( draw );
+}
+
+
/**
* Register new primitive setup/rendering state.
* This causes the drawing pipeline to be rebuilt.
@@ -245,6 +254,7 @@ void
draw_set_mapped_feedback_buffer(struct draw_context *draw, uint index,
void *buffer, uint size)
{
+ assert(index < PIPE_MAX_FEEDBACK_ATTRIBS);
draw->mapped_feedback_buffer[index] = buffer;
draw->mapped_feedback_buffer_size[index] = size; /* in bytes */
}