summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-08-30 09:49:00 -0600
committerBrian Paul <brianp@vmware.com>2011-08-30 10:17:53 -0600
commit5d9e242c3e28046e9c8ae1760533f92841d0cfaf (patch)
treee50fe618bf3fa51d767e9c758ec54a05aaab50f7
parent788d9bf12174ce59584f4ed768a24a9626f5d9b7 (diff)
tnl: fix regression in bind_indices()
Commit 2ea1ff38164d95f8291ef2e5dfe2cb13936a60f2 caused the regression. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40413
-rw-r--r--src/mesa/tnl/t_draw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index 283ab695485..03424d7a494 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -372,7 +372,8 @@ static void bind_indices( struct gl_context *ctx,
GL_MAP_READ_BIT, ib->obj);
assert(ib->obj->Pointer);
} else {
- ptr = ib->ptr;
+ /* user-space elements, or buffer already mapped */
+ ptr = ADD_POINTERS(ib->obj->Pointer, ib->ptr);
}
if (ib->type == GL_UNSIGNED_INT && VB->Primitive[0].basevertex == 0) {