aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/varray.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/varray.c')
-rw-r--r--mesalib/src/mesa/main/varray.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c
index f77014397..5e4d6c3e6 100644
--- a/mesalib/src/mesa/main/varray.c
+++ b/mesalib/src/mesa/main/varray.c
@@ -251,7 +251,8 @@ update_array(struct gl_context *ctx,
return;
}
- elementSize = _mesa_sizeof_type(type) * size;
+ elementSize = _mesa_bytes_per_vertex_attrib(size, type);
+ assert(elementSize != -1);
array = &ctx->Array.ArrayObj->VertexAttrib[attrib];
array->Size = size;