mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 05:58:05 +02:00
vbo: Fix array pointer calculation for MapBufferRange-mapped vertex data.
We would end up with the offset from the start of the mapping rather than the offset from the start of the buffer.
This commit is contained in:
parent
2d5c74fac3
commit
8096aa5213
1 changed files with 3 additions and 1 deletions
|
|
@ -218,7 +218,9 @@ vbo_exec_bind_arrays( GLcontext *ctx )
|
|||
/* a real buffer obj: Ptr is an offset, not a pointer*/
|
||||
GLsizeiptr offset;
|
||||
assert(exec->vtx.bufferobj->Pointer); /* buf should be mapped */
|
||||
offset = (GLbyte *) data - (GLbyte *) exec->vtx.bufferobj->Pointer;
|
||||
offset = (GLbyte *) data -
|
||||
(GLbyte *) exec->vtx.bufferobj->Pointer +
|
||||
exec->vtx.bufferobj->Offset;
|
||||
assert(offset >= 0);
|
||||
arrays[attr].Ptr = (void *) offset;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue