diff --git a/src/mapi/glapi/gen/ARB_internalformat_query2.xml b/src/mapi/glapi/gen/ARB_internalformat_query2.xml
new file mode 100644
index 00000000000..9b0f320fba7
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_internalformat_query2.xml
@@ -0,0 +1,119 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
index cd7feabba24..8421af48854 100644
--- a/src/mapi/glapi/gen/Makefile.am
+++ b/src/mapi/glapi/gen/Makefile.am
@@ -148,6 +148,7 @@ API_XML = \
ARB_indirect_parameters.xml \
ARB_instanced_arrays.xml \
ARB_internalformat_query.xml \
+ ARB_internalformat_query2.xml \
ARB_invalidate_subdata.xml \
ARB_map_buffer_range.xml \
ARB_multi_bind.xml \
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index db98ac05fd9..8b49f915169 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -8195,7 +8195,7 @@
-
+
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 24e3d189091..09b97c33074 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -857,6 +857,9 @@ const struct function common_desktop_functions_possible[] = {
/* GL_ARB_internalformat_query */
{ "glGetInternalformativ", 30, -1 },
+ /* GL_ARB_internalformat_query */
+ { "glGetInternalformati64v", 30, -1 },
+
/* GL_ARB_multi_bind */
{ "glBindBuffersBase", 44, -1 },
{ "glBindBuffersRange", 44, -1 },
@@ -2355,6 +2358,7 @@ const struct function gles3_functions_possible[] = {
{ "glGetInteger64v", 30, -1 },
{ "glGetIntegeri_v", 30, -1 },
{ "glGetInternalformativ", 30, -1 },
+ { "glGetInternalformati64v", 30, -1 },
// glGetProgramBinary aliases glGetProgramBinaryOES in GLES 2
{ "glGetQueryiv", 30, -1 },
{ "glGetQueryObjectuiv", 30, -1 },