summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-10-31 13:36:16 -0700
committerEric Anholt <[email protected]>2012-11-04 11:15:44 -0800
commit29a6307e12e132104ce42ad3b83e377ca34880a7 (patch)
tree028cdd8c25384b60541405698b0e2e3743a29c4c /src/mesa
parent13170321f6a5d1d8bd1b4b312323fd2c733dd568 (diff)
i965: Set dirty state for brw_draw_upload.c when num_instances changes.
Otherwise, if we had a set of prims passed in with a num_instances varying between them, we wouldn't upload enough (or too much!) from user vertex arrays. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 1cfba29d90a..22d18f91705 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -474,7 +474,10 @@ static bool brw_try_draw_prims( struct gl_context *ctx,
intel_batchbuffer_require_space(intel, estimated_max_prim_size, false);
intel_batchbuffer_save_state(intel);
- brw->num_instances = prim->num_instances;
+ if (brw->num_instances != prim->num_instances) {
+ brw->num_instances = prim->num_instances;
+ brw->state.dirty.brw |= BRW_NEW_VERTICES;
+ }
if (intel->gen < 6)
brw_set_prim(brw, &prim[i]);
else