summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/common/driverfuncs.c12
-rw-r--r--src/mesa/main/queryobj.c24
-rw-r--r--src/mesa/main/queryobj.h17
3 files changed, 23 insertions, 30 deletions
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 6c6b19538bd..3b397fef7de 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -202,8 +202,12 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->GetIntegerv = NULL;
driver->GetPointerv = NULL;
+ /* buffer objects */
_mesa_init_buffer_object_functions(driver);
+ /* query objects */
+ _mesa_init_query_object_functions(driver);
+
#if FEATURE_EXT_framebuffer_object
driver->NewFramebuffer = _mesa_new_framebuffer;
driver->NewRenderbuffer = _mesa_new_soft_renderbuffer;
@@ -216,14 +220,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->BlitFramebuffer = _swrast_BlitFramebuffer;
#endif
- /* query objects */
- 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;
-
/* APPLE_vertex_array_object */
driver->NewArrayObject = _mesa_new_array_object;
driver->DeleteArrayObject = _mesa_delete_array_object;
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index c25b31af023..a73c6e05081 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)
{
diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h
index bc02b65b54c..ee775ef959e 100644
--- a/src/mesa/main/queryobj.h
+++ b/src/mesa/main/queryobj.h
@@ -27,9 +27,6 @@
#define OCCLUDE_H
-extern struct gl_query_object *
-_mesa_new_query_object(GLcontext *ctx, GLuint id);
-
extern void
_mesa_init_query(GLcontext *ctx);
@@ -37,19 +34,7 @@ extern void
_mesa_free_query_data(GLcontext *ctx);
extern void
-_mesa_delete_query(GLcontext *ctx, struct gl_query_object *q);
-
-extern void
-_mesa_begin_query(GLcontext *ctx, struct gl_query_object *q);
-
-extern void
-_mesa_end_query(GLcontext *ctx, struct gl_query_object *q);
-
-extern void
-_mesa_wait_query(GLcontext *ctx, struct gl_query_object *q);
-
-extern void
-_mesa_check_query(GLcontext *ctx, struct gl_query_object *q);
+_mesa_init_query_object_functions(struct dd_function_table *driver);
extern void GLAPIENTRY