summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_save_draw.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-02-01 08:42:48 -0700
committerBrian Paul <[email protected]>2012-02-01 13:45:09 -0700
commite53557996ece5ab877652b8f83ae40bb4c483453 (patch)
treef9cb3f30fbe5f46c9194b52e082854ca3acf91e8 /src/mesa/vbo/vbo_save_draw.c
parentf09910f399d747e524731953bb11b64c1f4821d0 (diff)
vbo: fix node_attrsz[] usage in vbo_bind_vertex_list()
The node_attrsz[] array is initially copied from the node->attrsz[] array but some values get rewritten. Thereafter, we need to use the node_attrsz[] values. Fixes a bug when replaying a display list that uses generic vertex array[16] (at least). NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_save_draw.c')
-rw-r--r--src/mesa/vbo/vbo_save_draw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index 9f0290561e8..b903757c027 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -191,7 +191,7 @@ static void vbo_bind_vertex_list(struct gl_context *ctx,
save->inputs[attr] = &arrays[attr];
arrays[attr].Ptr = (const GLubyte *) NULL + buffer_offset;
- arrays[attr].Size = node->attrsz[src];
+ arrays[attr].Size = node_attrsz[src];
arrays[attr].StrideB = node->vertex_size * sizeof(GLfloat);
arrays[attr].Stride = node->vertex_size * sizeof(GLfloat);
arrays[attr].Type = GL_FLOAT;
@@ -205,7 +205,7 @@ static void vbo_bind_vertex_list(struct gl_context *ctx,
assert(arrays[attr].BufferObj->Name);
- buffer_offset += node->attrsz[src] * sizeof(GLfloat);
+ buffer_offset += node_attrsz[src] * sizeof(GLfloat);
varying_inputs |= VERT_BIT(attr);
ctx->NewState |= _NEW_ARRAY;
}