[Mesa-dev] [PATCH 07/10] nouveau: Use gl_array_attribute::_ElementSize.
Mathias.Froehlich at gmx.net
Mathias.Froehlich at gmx.net
Sat Nov 17 12:14:55 UTC 2018
From: Mathias Fröhlich <mathias.froehlich at web.de>
Instead of open coding the size computation, use the
already available gl_array_attribute::_ElementSize value.
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
---
src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
index 3900c770cb..97ff07808b 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
@@ -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;
}
--
2.17.2
More information about the mesa-dev
mailing list