diff --git a/src/mapi/glapi/gen/ARB_internalformat_query.xml b/src/mapi/glapi/gen/ARB_internalformat_query.xml
new file mode 100644
index 00000000000..70a2a310975
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_internalformat_query.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 934386031e3..4e5bef7b86a 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -8298,13 +8298,15 @@
-
+
+
+
-
+
diff --git a/src/mapi/glapi/gen/gl_genexec.py b/src/mapi/glapi/gen/gl_genexec.py
index da9ae716a54..a85b4471afc 100644
--- a/src/mapi/glapi/gen/gl_genexec.py
+++ b/src/mapi/glapi/gen/gl_genexec.py
@@ -108,6 +108,7 @@ header = """/**
#include "main/shaderapi.h"
#include "main/uniforms.h"
#include "main/syncobj.h"
+#include "main/formatquery.h"
#include "main/dispatch.h"
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 3cc6bbde0b8..5e1a7b55edc 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -900,6 +900,9 @@ const struct function gl_core_functions_possible[] = {
// { "glTextureStorage2DMultisampleEXT", 43, -1 }, // XXX: Add to xml
// { "glTextureStorage3DMultisampleEXT", 43, -1 }, // XXX: Add to xml
+ /* GL_ARB_internalformat_query */
+ { "glGetInternalformativ", 30, -1 },
+
{ NULL, 0, -1 }
};
@@ -1323,8 +1326,7 @@ const struct function gles3_functions_possible[] = {
{ "glGetInteger64i_v", 30, -1 },
{ "glGetInteger64v", 30, -1 },
{ "glGetIntegeri_v", 30, -1 },
- // XXX: Missing implementation of ARB_internalformat_query
- // { "glGetInternalformativ", 30, -1 },
+ { "glGetInternalformativ", 30, -1 },
// glGetProgramBinary aliases glGetProgramBinaryOES in GLES 2
{ "glGetQueryiv", 30, -1 },
{ "glGetQueryObjectuiv", 30, -1 },