mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 07:58:07 +02:00
Correct user VBO size.
This commit is contained in:
parent
913703d4b8
commit
f7195b3232
1 changed files with 8 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue