GL_EXT_disjoint_timer_query failing with GL_INVALID_ENUM
On GLES, calling
glGetQueryiv(GL_TIME_ELAPSED_EXT, GL_QUERY_COUNTER_BITS_EXT, &val);
glGetQueryiv(GL_TIMESTAMP_EXT, GL_QUERY_COUNTER_BITS_EXT, &val);
Both return GL_INVALID_ENUM
Mesa: User error: GL_INVALID_ENUM in glGetQueryivEXT(GL_QUERY_COUNTER_BITS)
Mesa: User error: GL_INVALID_ENUM in glGetQueryivEXT(GL_QUERY_COUNTER_BITS)
From https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_disjoint_timer_query.txt
The error INVALID_ENUM is generated if GetQueryivEXT is called where is not TIME_ELAPSED_EXT or TIMESTAMP_EXT.
The error INVALID_ENUM is generated if GetQueryivEXT is called where is not QUERY_COUNTER_BITS_EXT or CURRENT_QUERY_EXT
Quickly skimming over the code, apparently some checks are too strict and are based on https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_occlusion_query_boolean.txt where GL_QUERY_COUNTER_BITS_EXT doesn't exist.
I think the same issue happens on some other functions defined by this extension, but I haven't exhaustively tested them.
On a related note, but perhaps not the same issue, there is mention of glGetInteger64v
for systems that only support GLES2, but this function is not defined anywhere. I've already opened a Khronos issue: https://github.com/KhronosGroup/OpenGL-Registry/issues/326