mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
nouveau: 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
182ed6de8c
commit
a4c01839c2
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ get_array_stride(struct gl_context *ctx, const struct tnl_vertex_array *a)
|
|||
if (render->mode == VBO && !_mesa_is_bufferobj(binding->BufferObj)) {
|
||||
const struct gl_array_attributes *attrib = a->VertexAttrib;
|
||||
/* Pack client buffers. */
|
||||
return align(_mesa_sizeof_type(attrib->Type) * attrib->Size, 4);
|
||||
return align(attrib->_ElementSize, 4);
|
||||
} else {
|
||||
return binding->Stride;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue