diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index fc69c152c0b..0d2c9aaf690 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -2932,7 +2932,8 @@
-
+
diff --git a/src/mesa/main/glthread_marshal.h b/src/mesa/main/glthread_marshal.h
index f390cb9453c..05dbb106364 100644
--- a/src/mesa/main/glthread_marshal.h
+++ b/src/mesa/main/glthread_marshal.h
@@ -441,6 +441,19 @@ _mesa_get_matrix_index(struct gl_context *ctx, GLenum mode)
return M_DUMMY;
}
+static inline bool
+_mesa_matrix_is_identity(const float *m)
+{
+ static float identity[16] = {
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1
+ };
+
+ return !memcmp(m, identity, sizeof(identity));
+}
+
static inline void
_mesa_glthread_Enable(struct gl_context *ctx, GLenum cap)
{