diff options
| author | Zack Rusin <zackr@vmware.com> | 2013-04-19 16:51:27 -0700 |
|---|---|---|
| committer | Zack Rusin <zackr@vmware.com> | 2013-04-22 20:36:07 -0400 |
| commit | 913ed25f18aa9e24fc34fcf0b637d73ce355025d (patch) | |
| tree | 5be3d2ae7c99f3eaea96d6f416558d1286251d86 /src/gallium/auxiliary/draw/draw_context.c | |
| parent | 2aad06844fe50deeb905417ed75d3d167a947d5a (diff) | |
| download | external_mesa3d-913ed25f18aa9e24fc34fcf0b637d73ce355025d.tar.gz external_mesa3d-913ed25f18aa9e24fc34fcf0b637d73ce355025d.tar.bz2 external_mesa3d-913ed25f18aa9e24fc34fcf0b637d73ce355025d.zip | |
draw: add code to reset instance dependent data
We want to be able to reset certain parts of the pipeline,
in particular the input primitive index, but only either with
seperate invocations of the draw_vbo or new instances. In all
other cases (e.g. new invocations due to primitive restart)
that data needs to be preserved. Add a function through which
we can reset instance dependent data.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
| -rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 5272951d2b..25f79ae19e 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -156,6 +156,19 @@ boolean draw_init(struct draw_context *draw) return TRUE; } +/* + * Called whenever we're starting to draw a new instance. + * Some internal structures don't want to have to reset internal + * members on each invocation (because their state might have to persist + * between multiple primitive restart rendering call) but might have to + * for each new instance. + * This is particularly the case for primitive id's in geometry shader. + */ +void draw_new_instance(struct draw_context *draw) +{ + draw_geometry_shader_new_instance(draw->gs.geometry_shader); +} + void draw_destroy( struct draw_context *draw ) { |
