Merge commit 'origin/mesa_7_5_branch' into mesa_7_6_branch
[mesa.git] / src / mesa / state_tracker / st_draw.c
index 914a507bef61268415d148498523ccf85f052b43..503a5f34a3f25e7aedc4ea91e73439df732d7014 100644 (file)
@@ -533,6 +533,7 @@ st_draw_vbo(GLcontext *ctx,
             const struct _mesa_prim *prims,
             GLuint nr_prims,
             const struct _mesa_index_buffer *ib,
+           GLboolean index_bounds_valid,
             GLuint min_index,
             GLuint max_index)
 {
@@ -545,6 +546,10 @@ st_draw_vbo(GLcontext *ctx,
    unsigned num_vbuffers, num_velements;
    GLboolean userSpace;
 
+   /* Gallium probably doesn't want this in some cases. */
+   if (!index_bounds_valid)
+      vbo_get_minmax_index(ctx, prims, ib, &min_index, &max_index);
+
    /* sanity check for pointer arithmetic below */
    assert(sizeof(arrays[0]->Ptr[0]) == 1);