summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorMathias Fröhlich <mathias.froehlich@web.de>2018-11-17 07:13:11 +0100
committerMathias Fröhlich <mathias.froehlich@web.de>2018-11-21 06:27:19 +0100
commit2da7b0a2fbf0dbc5e89f19622cf3bbfa346ed0f1 (patch)
tree2225f6d03bafd883349665e4935b8a8a0ea4fdb5 /src/mesa/tnl
parenta4c01839c27a683901ef22e23e02e5849520222b (diff)
tnl: Use gl_array_attribute::_ElementSize.
Instead of open coding the size computation, use the already available gl_array_attribute::_ElementSize value. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_split_copy.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mesa/tnl/t_split_copy.c b/src/mesa/tnl/t_split_copy.c
index 085ae9a28c9..1732b4c9ca6 100644
--- a/src/mesa/tnl/t_split_copy.c
+++ b/src/mesa/tnl/t_split_copy.c
@@ -105,13 +105,6 @@ struct copy_context {
};
-static GLuint
-attr_size(const struct gl_array_attributes *attrib)
-{
- return attrib->Size * _mesa_sizeof_type(attrib->Type);
-}
-
-
/**
* Shallow copy one vertex array to another.
*/
@@ -458,8 +451,8 @@ replay_init(struct copy_context *copy)
copy->varying[j].attr = i;
copy->varying[j].array = &copy->array[i];
- copy->varying[j].size = attr_size(attrib);
- copy->vertex_size += attr_size(attrib);
+ copy->varying[j].size = attrib->_ElementSize;
+ copy->vertex_size += attrib->_ElementSize;
if (_mesa_is_bufferobj(vbo) &&
!_mesa_bufferobj_mapped(vbo, MAP_INTERNAL))