summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-05-21 16:43:12 +0200
committerChristian König <[email protected]>2011-05-21 16:43:12 +0200
commitaa63ebc48a2ee1ee9afbf2112d4d25e8a9a8d1e8 (patch)
treec97d505614f1fd84d498484a45156e0064daf649 /src/gallium/auxiliary/util
parent120b55a96e30f1f74ba3448665cef3d724fed647 (diff)
parent3c5e74186244f2d77cc711d2b487283459ed06ad (diff)
Merge remote-tracking branch 'origin/master' into pipe-video
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_vbuf_mgr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c b/src/gallium/auxiliary/util/u_vbuf_mgr.c
index a034483ee5c..04149525ea7 100644
--- a/src/gallium/auxiliary/util/u_vbuf_mgr.c
+++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c
@@ -581,7 +581,12 @@ static void u_vbuf_mgr_compute_max_index(struct u_vbuf_mgr_priv *mgr)
* for that when dividing by stride. */
unused = vb->stride -
(mgr->ve->ve[i].src_offset + mgr->ve->src_format_size[i]);
- assert(unused >= 0);
+
+ /* If src_offset is greater than stride (which means it's a buffer
+ * offset rather than a vertex offset)... */
+ if (unused < 0) {
+ unused = 0;
+ }
/* Compute the maximum index for this vertex element. */
max_index =