diff options
author | Christian König <[email protected]> | 2011-05-21 16:43:12 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-05-21 16:43:12 +0200 |
commit | aa63ebc48a2ee1ee9afbf2112d4d25e8a9a8d1e8 (patch) | |
tree | c97d505614f1fd84d498484a45156e0064daf649 /src/gallium/auxiliary/util | |
parent | 120b55a96e30f1f74ba3448665cef3d724fed647 (diff) | |
parent | 3c5e74186244f2d77cc711d2b487283459ed06ad (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.c | 7 |
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 = |