diff options
author | Brian Paul <brianp@vmware.com> | 2009-06-19 10:05:08 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-06-19 10:05:08 -0600 |
commit | a8da1feb231115205f3a19b0bb0a9317157ba167 (patch) | |
tree | 31d7231c1c87d0695facedb5a49ee58a9d23a1d5 /src/mesa | |
parent | 331eb58f68db26b54f706a908a3e1424a461b709 (diff) |
mesa: make query-related driver fallback functions static
Plug them in via _mesa_init_query_object_functions().
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/common/driverfuncs.c | 12 | ||||
-rw-r--r-- | src/mesa/main/queryobj.c | 24 | ||||
-rw-r--r-- | src/mesa/main/queryobj.h | 17 |
3 files changed, 23 insertions, 30 deletions
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index 6c6b19538b..3b397fef7d 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 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) { diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h index bc02b65b54..ee775ef959 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 |