summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorMaciej Cencora <[email protected]>2009-07-05 15:00:42 +0200
committerMaciej Cencora <[email protected]>2009-07-08 18:42:39 +0200
commitafd687b0dcf9ac842b4c4832247c6ffe5cc844b1 (patch)
treea32e5990873972cd1f1be6091a08a9bb4d5b3bbc /src/mesa/vbo
parenteb33c0ab8b3594f0b1d58534a13a26e3fb050cff (diff)
mesa/vbo: always recalculate min_index and max_index when splitting vertices
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_split_inplace.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/src/mesa/vbo/vbo_split_inplace.c b/src/mesa/vbo/vbo_split_inplace.c
index 3ed6b34fbf0..266bc56c826 100644
--- a/src/mesa/vbo/vbo_split_inplace.c
+++ b/src/mesa/vbo/vbo_split_inplace.c
@@ -63,35 +63,19 @@ static void flush_vertex( struct split_context *split )
if (!split->dstprim_nr)
return;
- if (split->ib) {
- /* This should basically be multipass rendering over the same
- * unchanging set of VBO's. Would like the driver not to
- * re-upload the data, or swtnl not to re-transform the
- * vertices.
- */
- assert(split->max_index - split->min_index < split->limits->max_verts);
- min_index = split->min_index;
- max_index = split->max_index;
- }
- else {
- /* Non-indexed rendering. Cannot assume that the primitives are
- * ordered by increasing vertex, because of entrypoints like
- * MultiDrawArrays.
- */
- GLuint i;
- min_index = split->dstprim[0].start;
- max_index = min_index + split->dstprim[0].count - 1;
+ GLuint i;
+ min_index = split->dstprim[0].start;
+ max_index = min_index + split->dstprim[0].count - 1;
- for (i = 1; i < split->dstprim_nr; i++) {
- GLuint tmp_min = split->dstprim[i].start;
- GLuint tmp_max = tmp_min + split->dstprim[i].count - 1;
+ for (i = 1; i < split->dstprim_nr; i++) {
+ GLuint tmp_min = split->dstprim[i].start;
+ GLuint tmp_max = tmp_min + split->dstprim[i].count - 1;
- if (tmp_min < min_index)
- min_index = tmp_min;
+ if (tmp_min < min_index)
+ min_index = tmp_min;
- if (tmp_max > max_index)
- max_index = tmp_max;
- }
+ if (tmp_max > max_index)
+ max_index = tmp_max;
}
assert(max_index >= min_index);