From c3538969e1ae3e626a618934aa8f35a7a22ddb39 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 22 May 2009 13:15:41 -0600 Subject: 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. --- src/mesa/vbo/vbo_exec_draw.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 5381cc4d92..da2d849ded 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -185,6 +185,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; -- cgit v1.2.3