summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_render.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r--src/gallium/drivers/r300/r300_render.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 429b85545f7..3674edc975f 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -305,6 +305,18 @@ static boolean r300_prepare_for_rendering(struct r300_context *r300,
int index_bias,
int instance_id)
{
+ /* Update vertex elements for InstanceID here. */
+ boolean instancing_enabled = instance_id != -1;
+
+ if (r300->screen->caps.has_tcl &&
+ (flags & PREP_EMIT_AOS) &&
+ instancing_enabled != r300->instancing_enabled) {
+ r300->instancing_enabled = instancing_enabled;
+ r300_mark_atom_dirty(r300, &r300->vertex_stream_state);
+ r300->vertex_arrays_dirty = TRUE;
+ flags |= PREP_EMIT_STATES;
+ }
+
/* Make sure there is enough space in the command stream and emit states. */
if (r300_reserve_cs_dwords(r300, flags, cs_dwords))
flags |= PREP_EMIT_STATES;