st/mesa: use min_index and max_index directly from vbo
authorMarek Olšák <marek.olsak@amd.com>
Tue, 25 Apr 2017 22:28:29 +0000 (00:28 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 28 Apr 2017 19:46:44 +0000 (21:46 +0200)
also remove the incorrect comment about primitive restart.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_draw.c

index d710284b11c45e0891a3b211ba2f16ed3ea66f1e..e510d437baf08c0e0ec7f6cb71a340f438a449da 100644 (file)
@@ -207,14 +207,9 @@ st_draw_vbo(struct gl_context *ctx,
       setup_index_buffer(st, ib);
 
       info.indexed = TRUE;
-      if (min_index != ~0U && max_index != ~0U) {
-         info.min_index = min_index;
-         info.max_index = max_index;
-      }
+      info.min_index = min_index;
+      info.max_index = max_index;
 
-      /* The VBO module handles restart for the non-indexed GLDrawArrays
-       * so we only set these fields for indexed drawing:
-       */
       setup_primitive_restart(ctx, &info, ib->index_size);
    }
    else {