Mesa (mesa_7_4_branch): vbo: fix crash in vbo_exec_bind_arrays()
Brian Paul
brianp at kemper.freedesktop.org
Fri May 22 19:21:03 UTC 2009
Module: Mesa
Branch: mesa_7_4_branch
Commit: 9dbe32f5eb001ee3c810b02ef70a37f6dc8ca43a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9dbe32f5eb001ee3c810b02ef70a37f6dc8ca43a
Author: Brian Paul <brianp at vmware.com>
Date: Fri May 22 13:19:42 2009 -0600
vbo: fix crash in vbo_exec_bind_arrays()
When a vertex shader uses generic vertex attribute 0, but not gl_Vertex,
we need to set attribute[16] to point to attribute[0]. We were setting the
attribute size, but not the pointer.
Fixes crash in glsl/multitex.c when using the VertCoord attribute instead
of gl_Vertex.
(cherry picked from commit c3538969e1ae3e626a618934aa8f35a7a22ddb39)
---
src/mesa/vbo/vbo_exec_draw.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index ad8b6e8..74b7a1f 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -184,6 +184,7 @@ static void vbo_exec_bind_arrays( GLcontext *ctx )
(ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_GENERIC0)) {
exec->vtx.inputs[16] = exec->vtx.inputs[0];
exec->vtx.attrsz[16] = exec->vtx.attrsz[0];
+ exec->vtx.attrptr[16] = exec->vtx.attrptr[0];
exec->vtx.attrsz[0] = 0;
}
break;
More information about the mesa-commit
mailing list