diff options
author | Roland Scheidegger <sroland@vmware.com> | 2010-03-09 14:23:00 +0100 |
---|---|---|
committer | Roland Scheidegger <sroland@vmware.com> | 2010-03-09 14:23:00 +0100 |
commit | e8983f70b41ea92a9527cb618db011b5dd136626 (patch) | |
tree | 1e73d7f45dc09106783b604752ec6b8b7a27778a /src/gallium/drivers/llvmpipe/lp_state_vertex.c | |
parent | fe9f8536f1b1e7a3a2ac10afd8078e8f4d327578 (diff) |
gallium: don't use flexible array members in drivers for vertex elements cso
While this c99 feature should work with most compilers, valgrind doesn't
really like it, and this only really saves some memory, we don't do this
in similar occasions (like the blend state) neither.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_vertex.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_vertex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_vertex.c b/src/gallium/drivers/llvmpipe/lp_state_vertex.c index 5a9b6d5e18..2ddd110a5f 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_vertex.c +++ b/src/gallium/drivers/llvmpipe/lp_state_vertex.c @@ -42,7 +42,7 @@ llvmpipe_create_vertex_elements_state(struct pipe_context *pipe, { struct lp_velems_state *velems; assert(count <= PIPE_MAX_ATTRIBS); - velems = (struct lp_velems_state *) MALLOC(sizeof(struct lp_velems_state) + count * sizeof(*attribs)); + velems = (struct lp_velems_state *) MALLOC(sizeof(struct lp_velems_state)); if (velems) { velems->count = count; memcpy(velems->velem, attribs, sizeof(*attribs) * count); |