mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 14:30:10 +01:00
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>
This commit is contained in:
parent
a4c01839c2
commit
2da7b0a2fb
1 changed files with 2 additions and 9 deletions
|
|
@ -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 = ©->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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue