Mesa (master): main: Added entry points for glGetQueryBufferObject*

Martin Peres mperes at kemper.freedesktop.org
Wed Mar 25 08:07:16 UTC 2015


Module: Mesa
Branch: master
Commit: 19e6efc0ad0e937bd89c00967d06f54d987810bc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=19e6efc0ad0e937bd89c00967d06f54d987810bc

Author: Martin Peres <martin.peres at linux.intel.com>
Date:   Mon Feb 16 12:20:19 2015 +0200

main: Added entry points for glGetQueryBufferObject*

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 at jlekstrand.net>
Signed-off-by: Martin Peres <martin.peres at linux.intel.com>

---

 src/mapi/glapi/gen/ARB_direct_state_access.xml |   27 ++++++++++++++++
 src/mesa/main/queryobj.c                       |   39 ++++++++++++++++++++++++
 src/mesa/main/queryobj.h                       |   12 ++++++++
 src/mesa/main/tests/dispatch_sanity.cpp        |    4 +++
 4 files changed, 82 insertions(+)

diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml
index a6d991c..05b9f3f 100644
--- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
+++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
@@ -428,5 +428,32 @@
       <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>
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 1935058..fbccf3f 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -914,6 +914,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.
  */
 void
diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h
index 431d420..d1036fc 100644
--- a/src/mesa/main/queryobj.h
+++ b/src/mesa/main/queryobj.h
@@ -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 */
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index e5362fb..c6dd50b 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -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 },




More information about the mesa-commit mailing list