projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd3b812
)
u_vbuf_mgr: fix uploading if format size is greater than stride
author
Marek Olšák
<maraeo@gmail.com>
Sun, 19 Jun 2011 17:38:48 +0000
(19:38 +0200)
committer
Marek Olšák
<maraeo@gmail.com>
Sun, 19 Jun 2011 19:09:18 +0000
(21:09 +0200)
src/gallium/auxiliary/util/u_vbuf_mgr.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_vbuf_mgr.c
b/src/gallium/auxiliary/util/u_vbuf_mgr.c
index 04149525ea778fde8aa6cf14786ce49b151273ab..fdfa9fcca3d25572746b7ca5f237b23348e810f5 100644
(file)
--- a/
src/gallium/auxiliary/util/u_vbuf_mgr.c
+++ b/
src/gallium/auxiliary/util/u_vbuf_mgr.c
@@
-537,6
+537,11
@@
static void u_vbuf_upload_buffers(struct u_vbuf_mgr_priv *mgr,
} else if (vb->stride) {
first = vb->stride * min_index;
size = vb->stride * count;
+
+ /* Unusual case when stride is smaller than the format size.
+ * XXX This won't work with interleaved arrays. */
+ if (mgr->ve->native_format_size[i] > vb->stride)
+ size += mgr->ve->native_format_size[i] - vb->stride;
} else {
first = 0;
size = mgr->ve->native_format_size[i];