summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-09-21 07:26:33 +0200
committerEric Anholt <[email protected]>2012-09-27 13:22:49 -0700
commit7f9e1a7720f5e7b464c39e3640e8ed64687e9645 (patch)
tree3b7afdc7853cc0dc1cdbd827f06c4c30ef0e8a54 /src/mesa/drivers
parent0334e8dc25d09e3254e61d5d122b4fd7bfbd627a (diff)
i965: Add a comment explaining one of the brw_draw_upload.c loops.
Reviewed-and-tested-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 31e092e2cc6..f5f65caf058 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -411,6 +411,10 @@ static void brw_prepare_vertices(struct brw_context *brw)
intel_buffer_object(glarray->BufferObj);
int k;
+ /* If we have a VB set to be uploaded for this buffer object
+ * already, reuse that VB state so that we emit fewer
+ * relocations.
+ */
for (k = 0; k < i; k++) {
const struct gl_client_array *other = brw->vb.enabled[k]->glarray;
if (glarray->BufferObj == other->BufferObj &&