summaryrefslogtreecommitdiff
path: root/src/mesa/main/queryobj.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-06-19 10:05:08 -0600
committerBrian Paul <brianp@vmware.com>2009-06-19 10:05:08 -0600
commita8da1feb231115205f3a19b0bb0a9317157ba167 (patch)
tree31d7231c1c87d0695facedb5a49ee58a9d23a1d5 /src/mesa/main/queryobj.c
parent331eb58f68db26b54f706a908a3e1424a461b709 (diff)
mesa: make query-related driver fallback functions static
Plug them in via _mesa_init_query_object_functions().
Diffstat (limited to 'src/mesa/main/queryobj.c')
-rw-r--r--src/mesa/main/queryobj.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index c25b31af02..a73c6e0508 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -38,7 +38,7 @@
* \param id - the new object's ID
* \return pointer to new query_object object or NULL if out of memory.
*/
-struct gl_query_object *
+static struct gl_query_object *
_mesa_new_query_object(GLcontext *ctx, GLuint id)
{
struct gl_query_object *q = MALLOC_STRUCT(gl_query_object);
@@ -57,7 +57,7 @@ _mesa_new_query_object(GLcontext *ctx, GLuint id)
* Begin a query. Software driver fallback.
* Called via ctx->Driver.BeginQuery().
*/
-void
+static void
_mesa_begin_query(GLcontext *ctx, struct gl_query_object *q)
{
/* no-op */
@@ -68,7 +68,7 @@ _mesa_begin_query(GLcontext *ctx, struct gl_query_object *q)
* End a query. Software driver fallback.
* Called via ctx->Driver.EndQuery().
*/
-void
+static void
_mesa_end_query(GLcontext *ctx, struct gl_query_object *q)
{
q->Ready = GL_TRUE;
@@ -79,7 +79,7 @@ _mesa_end_query(GLcontext *ctx, struct gl_query_object *q)
* Wait for query to complete. Software driver fallback.
* Called via ctx->Driver.WaitQuery().
*/
-void
+static void
_mesa_wait_query(GLcontext *ctx, struct gl_query_object *q)
{
/* For software drivers, _mesa_end_query() should have completed the query.
@@ -94,7 +94,7 @@ _mesa_wait_query(GLcontext *ctx, struct gl_query_object *q)
* Check if a query results are ready. Software driver fallback.
* Called via ctx->Driver.CheckQuery().
*/
-void
+static void
_mesa_check_query(GLcontext *ctx, struct gl_query_object *q)
{
/* No-op for sw rendering.
@@ -107,7 +107,7 @@ _mesa_check_query(GLcontext *ctx, struct gl_query_object *q)
* Delete a query object. Called via ctx->Driver.DeleteQuery().
* Not removed from hash table here.
*/
-void
+static void
_mesa_delete_query(GLcontext *ctx, struct gl_query_object *q)
{
_mesa_free(q);
@@ -123,6 +123,18 @@ lookup_query_object(GLcontext *ctx, GLuint id)
+void
+_mesa_init_query_object_functions(struct dd_function_table *driver)
+{
+ driver->NewQueryObject = _mesa_new_query_object;
+ driver->DeleteQuery = _mesa_delete_query;
+ driver->BeginQuery = _mesa_begin_query;
+ driver->EndQuery = _mesa_end_query;
+ driver->WaitQuery = _mesa_wait_query;
+ driver->CheckQuery = _mesa_check_query;
+}
+
+
void GLAPIENTRY
_mesa_GenQueriesARB(GLsizei n, GLuint *ids)
{