main: Added entry points for glGetQueryBufferObject*
authorMartin Peres <martin.peres@linux.intel.com>
Mon, 16 Feb 2015 10:20:19 +0000 (12:20 +0200)
committerMartin Peres <martin.peres@linux.intel.com>
Wed, 25 Mar 2015 08:05:45 +0000 (10:05 +0200)
These entry points will be fleshed out when the GL_ARB_query_buffer_object
extension gets implemented. In the meantime, return GL_INVALID_OPERATION as
suggested by Ian.

Reviewed-by: Laura Ekstrand <laura@jlekstrand.net>
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
src/mapi/glapi/gen/ARB_direct_state_access.xml
src/mesa/main/queryobj.c
src/mesa/main/queryobj.h
src/mesa/main/tests/dispatch_sanity.cpp

index a6d991c950e274390732ea717636e818e6927883..05b9f3fe06ff67596dca58cc27bc1fbab36afa3a 100644 (file)
       <param name="ids" type="GLuint *" />
    </function>
 
+   <function name="GetQueryBufferObjectiv" offset="assign">
+      <param name="id" type="GLuint" />
+      <param name="buffer" type="GLuint" />
+      <param name="pname" type="GLenum" />
+      <param name="offset" type="GLintptr" />
+   </function>
+
+   <function name="GetQueryBufferObjectuiv" offset="assign">
+      <param name="id" type="GLuint" />
+      <param name="buffer" type="GLuint" />
+      <param name="pname" type="GLenum" />
+      <param name="offset" type="GLintptr" />
+   </function>
+
+   <function name="GetQueryBufferObjecti64v" offset="assign">
+      <param name="id" type="GLuint" />
+      <param name="buffer" type="GLuint" />
+      <param name="pname" type="GLenum" />
+      <param name="offset" type="GLintptr" />
+   </function>
+
+   <function name="GetQueryBufferObjectui64v" offset="assign">
+      <param name="id" type="GLuint" />
+      <param name="buffer" type="GLuint" />
+      <param name="pname" type="GLenum" />
+      <param name="offset" type="GLintptr" />
+   </function>
 </category>
 </OpenGLAPI>
index 19350584a8cda80d20509457d9ab88c69e1eaa52..fbccf3fe6f415ee65d2509af67e0999ad71a2647 100644 (file)
@@ -913,6 +913,45 @@ _mesa_GetQueryObjectui64v(GLuint id, GLenum pname, GLuint64EXT *params)
    }
 }
 
+/**
+ * New with GL_ARB_query_buffer_object
+ */
+void GLAPIENTRY
+_mesa_GetQueryBufferObjectiv(GLuint id, GLuint buffer, GLenum pname,
+                             GLintptr offset)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   _mesa_error(ctx, GL_INVALID_OPERATION, "glGetQueryBufferObjectiv");
+}
+
+
+void GLAPIENTRY
+_mesa_GetQueryBufferObjectuiv(GLuint id, GLuint buffer, GLenum pname,
+                              GLintptr offset)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   _mesa_error(ctx, GL_INVALID_OPERATION, "glGetQueryBufferObjectuiv");
+}
+
+
+void GLAPIENTRY
+_mesa_GetQueryBufferObjecti64v(GLuint id, GLuint buffer, GLenum pname,
+                               GLintptr offset)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   _mesa_error(ctx, GL_INVALID_OPERATION, "glGetQueryBufferObjecti64v");
+}
+
+
+void GLAPIENTRY
+_mesa_GetQueryBufferObjectui64v(GLuint id, GLuint buffer, GLenum pname,
+                                GLintptr offset)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   _mesa_error(ctx, GL_INVALID_OPERATION, "glGetQueryBufferObjectui64v");
+}
+
+
 /**
  * Allocate/init the context state related to query objects.
  */
index 431d4204feeb4796056f0540d644997130141335..d1036fcce3d3b6668a82f840c4f078c6bc27ed9b 100644 (file)
@@ -79,5 +79,17 @@ void GLAPIENTRY
 _mesa_GetQueryObjecti64v(GLuint id, GLenum pname, GLint64EXT *params);
 void GLAPIENTRY
 _mesa_GetQueryObjectui64v(GLuint id, GLenum pname, GLuint64EXT *params);
+void GLAPIENTRY
+_mesa_GetQueryBufferObjectiv(GLuint id, GLuint buffer, GLenum pname,
+                             GLintptr offset);
+void GLAPIENTRY
+_mesa_GetQueryBufferObjectuiv(GLuint id, GLuint buffer, GLenum pname,
+                              GLintptr offset);
+void GLAPIENTRY
+_mesa_GetQueryBufferObjecti64v(GLuint id, GLuint buffer, GLenum pname,
+                               GLintptr offset);
+void GLAPIENTRY
+_mesa_GetQueryBufferObjectui64v(GLuint id, GLuint buffer, GLenum pname,
+                                GLintptr offset);
 
 #endif /* QUERYOBJ_H */
index e5362fb267925cc007607fc13ea6024dd7072571..c6dd50ba40a9888fac870d2ace9238d7907e340c 100644 (file)
@@ -977,6 +977,10 @@ const struct function gl_core_functions_possible[] = {
    { "glTextureBuffer", 45, -1 },
    { "glTextureBufferRange", 45, -1 },
    { "glCreateQueries", 45, -1 },
+   { "glGetQueryBufferObjectiv", 45, -1 },
+   { "glGetQueryBufferObjectuiv", 45, -1 },
+   { "glGetQueryBufferObjecti64v", 45, -1 },
+   { "glGetQueryBufferObjectui64v", 45, -1 },
 
    /* GL_EXT_polygon_offset_clamp */
    { "glPolygonOffsetClampEXT", 11, -1 },