Mesa (master): i965: Set dirty state for brw_draw_upload. c when num_instances changes.
Eric Anholt
anholt at kemper.freedesktop.org
Sun Nov 4 19:58:05 UTC 2012
Module: Mesa
Branch: master
Commit: 29a6307e12e132104ce42ad3b83e377ca34880a7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=29a6307e12e132104ce42ad3b83e377ca34880a7
Author: Eric Anholt <eric at anholt.net>
Date: Wed Oct 31 13:36:16 2012 -0700
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 <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_draw.c | 5 ++++-
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 1cfba29..22d18f9 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
More information about the mesa-commit
mailing list