summaryrefslogtreecommitdiffstats
path: root/src/mesa/math/m_matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/math/m_matrix.c')
-rw-r--r--src/mesa/math/m_matrix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/math/m_matrix.c b/src/mesa/math/m_matrix.c
index 57a49533de2..6f91dbd1915 100644
--- a/src/mesa/math/m_matrix.c
+++ b/src/mesa/math/m_matrix.c
@@ -39,6 +39,8 @@
#include "main/glheader.h"
#include "main/imports.h"
#include "main/macros.h"
+#define MATH_ASM_PTR_SIZE sizeof(void *)
+#include "math/m_vector_asm.h"
#include "m_matrix.h"
@@ -1137,6 +1139,9 @@ _math_matrix_viewport(GLmatrix *m, const float scale[3],
void
_math_matrix_set_identity( GLmatrix *mat )
{
+ STATIC_ASSERT(MATRIX_M == offsetof(GLmatrix, m));
+ STATIC_ASSERT(MATRIX_INV == offsetof(GLmatrix, inv));
+
memcpy( mat->m, Identity, sizeof(Identity) );
memcpy( mat->inv, Identity, sizeof(Identity) );