[Mesa-dev] [PATCH 2/3] i965: Add a comment explaining one of the brw_draw_upload.c loops.

Eric Anholt eric at anholt.net
Fri Sep 21 00:59:56 PDT 2012


---
 src/mesa/drivers/dri/i965/brw_draw_upload.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 31e092e..f5f65ca 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 &&
-- 
1.7.10.4



More information about the mesa-dev mailing list