Mesa (master): tnl: fix regression in bind_indices()

Brian Paul brianp at kemper.freedesktop.org
Tue Aug 30 16:18:32 UTC 2011


Module: Mesa
Branch: master
Commit: 5d9e242c3e28046e9c8ae1760533f92841d0cfaf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d9e242c3e28046e9c8ae1760533f92841d0cfaf

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Aug 30 09:49:00 2011 -0600

tnl: fix regression in bind_indices()

Commit 2ea1ff38164d95f8291ef2e5dfe2cb13936a60f2 caused the regression.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40413

---

 src/mesa/tnl/t_draw.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index 283ab69..03424d7 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) {




More information about the mesa-commit mailing list