[Mesa-dev] [PATCH 9/9] i965: Add perf debug hint when the app makes us do index buffer scanning.

Eric Anholt eric at anholt.net
Tue Oct 8 14:00:36 PDT 2013


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

diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index b6cfd53..0acd089 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -481,8 +481,11 @@ void brw_draw_prims( struct gl_context *ctx,
     * get the minimum and maximum of their index buffer so we know what range
     * to upload.
     */
-   if (!vbo_all_varyings_in_vbos(arrays) && !index_bounds_valid)
+   if (!vbo_all_varyings_in_vbos(arrays) && !index_bounds_valid) {
+      perf_debug("Scanning index buffer to compute index buffer bounds.  "
+                 "Use glDrawRangeElements() to avoid this.\n");
       vbo_get_minmax_indices(ctx, prims, ib, &min_index, &max_index, nr_prims);
+   }
 
    /* Do GL_SELECT and GL_FEEDBACK rendering using swrast, even though it
     * won't support all the extensions we support.
-- 
1.8.4.rc3



More information about the mesa-dev mailing list