summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_split.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2009-08-27 10:09:24 -0700
committerEric Anholt <[email protected]>2009-09-08 15:12:20 -0700
commit92d7ed8a20d4a018ce5324e6537ae7b478b9e5bf (patch)
treedb04f9d7c60b1cd174c93fbe112f00058c85e092 /src/mesa/vbo/vbo_split.c
parentec9e7295800aff0f04815de736127101f770033f (diff)
mesa: Add support for ARB_draw_elements_base_vertex.
Diffstat (limited to 'src/mesa/vbo/vbo_split.c')
-rw-r--r--src/mesa/vbo/vbo_split.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_split.c b/src/mesa/vbo/vbo_split.c
index 58e879628de..c445acca7d6 100644
--- a/src/mesa/vbo/vbo_split.c
+++ b/src/mesa/vbo/vbo_split.c
@@ -50,6 +50,7 @@
#include "main/glheader.h"
#include "main/imports.h"
#include "main/mtypes.h"
+#include "main/macros.h"
#include "vbo_split.h"
#include "vbo.h"
@@ -107,7 +108,12 @@ void vbo_split_prims( GLcontext *ctx,
vbo_draw_func draw,
const struct split_limits *limits )
{
-
+ GLuint max_basevertex = prim->basevertex;
+ GLuint i;
+
+ for (i = 1; i < nr_prims; i++)
+ max_basevertex = MAX2(max_basevertex, prim[i].basevertex);
+
if (ib) {
if (limits->max_indices == 0) {
/* Could traverse the indices, re-emitting vertices in turn.