diff options
author | marha <marha@users.sourceforge.net> | 2011-05-18 07:55:12 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-05-18 07:55:12 +0000 |
commit | 32a666fa1f26defd3b4e508b75f1acf6e2900a40 (patch) | |
tree | 9735440d047c660e4966060a3020e2cae419d77c /mesalib/src/gallium/auxiliary | |
parent | ab5c2d2c78273ccdc7c9734bcba482a33fcf9652 (diff) | |
parent | 35484135119fcf55fe1cbb1fcdd0e035f581fcfb (diff) | |
download | vcxsrv-32a666fa1f26defd3b4e508b75f1acf6e2900a40.tar.gz vcxsrv-32a666fa1f26defd3b4e508b75f1acf6e2900a40.tar.bz2 vcxsrv-32a666fa1f26defd3b4e508b75f1acf6e2900a40.zip |
merge ^/branches/released .
Diffstat (limited to 'mesalib/src/gallium/auxiliary')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c b/mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c index 78e9df033..8a66c2e95 100644 --- a/mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c +++ b/mesalib/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 =
|