mesa: memset matrices at initialization to enable memcpy on it

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
This commit is contained in:
Marek Olšák
2020-10-05 21:20:47 -04:00
committed by Marge Bot
parent 019f131601
commit 0d7347105f
+1
View File
@@ -1519,6 +1519,7 @@ _math_matrix_loadf( GLmatrix *mat, const GLfloat *m )
void
_math_matrix_ctr( GLmatrix *m )
{
memset(m, 0, sizeof(*m));
memcpy( m->m, Identity, sizeof(Identity) );
memcpy( m->inv, Identity, sizeof(Identity) );
m->type = MATRIX_IDENTITY;