i965: Drop pointless check for variable declarations in splitting.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_draw.c
index d684c172212f4bb553c7cb580a45d23608de767d..ef0f2737ca11aba0da07aa794168d199c87b7dad 100644 (file)
@@ -554,7 +554,8 @@ 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 (!index_bounds_valid &&
+       (ctx->RenderMode != GL_RENDER || !vbo_all_varyings_in_vbos(arrays))) {
       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);