projects
/
profile
/
ivi
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
913703d
)
Correct user VBO size.
author
Ben Skeggs
<skeggsb@gmail.com>
Mon, 10 Dec 2007 10:07:53 +0000
(21:07 +1100)
committer
Ben Skeggs
<skeggsb@gmail.com>
Mon, 10 Dec 2007 10:08:42 +0000
(21:08 +1100)
src/mesa/state_tracker/st_draw.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_draw.c
b/src/mesa/state_tracker/st_draw.c
index
c6fea1f
..
24bb482
100644
(file)
--- a/
src/mesa/state_tracker/st_draw.c
+++ b/
src/mesa/state_tracker/st_draw.c
@@
-266,9
+266,14
@@
st_draw_vbo(GLcontext *ctx,
}
else {
/* attribute data is in user-space memory, not a VBO */
- uint bytes = (arrays[mesaAttr]->Size
- * _mesa_sizeof_type(arrays[mesaAttr]->Type)
- * (max_index + 1));
+ uint bytes;
+
+ if (!arrays[mesaAttr]->StrideB) {
+ bytes = arrays[mesaAttr]->Size
+ * _mesa_sizeof_type(arrays[mesaAttr]->Type);
+ } else {
+ bytes = arrays[mesaAttr]->StrideB * (max_index + 1);
+ }
/* wrap user data */
vbuffer[attr].buffer