Mesa (master): mesa: make _mesa_alloc_dispatch_table() static
Brian Paul
brianp at kemper.freedesktop.org
Wed Mar 18 15:50:18 UTC 2015
Module: Mesa
Branch: master
Commit: 4009d22b61e76850b1b725f4e491da05c2406fa4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4009d22b61e76850b1b725f4e491da05c2406fa4
Author: Brian Paul <brianp at vmware.com>
Date: Fri Mar 13 12:05:01 2015 -0600
mesa: make _mesa_alloc_dispatch_table() static
Never called from outside of context.c
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
---
src/mesa/main/api_exec.h | 4 ----
src/mesa/main/context.c | 10 +++++-----
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/mesa/main/api_exec.h b/src/mesa/main/api_exec.h
index 1e4a9d6..12249fe 100644
--- a/src/mesa/main/api_exec.h
+++ b/src/mesa/main/api_exec.h
@@ -30,12 +30,8 @@
extern "C" {
#endif
-struct _glapi_table;
struct gl_context;
-extern struct _glapi_table *
-_mesa_alloc_dispatch_table(void);
-
extern void
_mesa_initialize_exec_table(struct gl_context *ctx);
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index e7d1f4d..c1acda9 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -931,8 +931,8 @@ nop_glFlush(void)
* populated with pointers to "no-op" functions. In turn, the no-op
* functions will call nop_handler() above.
*/
-struct _glapi_table *
-_mesa_alloc_dispatch_table(void)
+static struct _glapi_table *
+alloc_dispatch_table(void)
{
/* Find the larger of Mesa's dispatch table and libGL's dispatch table.
* In practice, this'll be the same for stand-alone Mesa. But for DRI
@@ -1001,7 +1001,7 @@ create_beginend_table(const struct gl_context *ctx)
{
struct _glapi_table *table;
- table = _mesa_alloc_dispatch_table();
+ table = alloc_dispatch_table();
if (!table)
return NULL;
@@ -1140,7 +1140,7 @@ _mesa_initialize_context(struct gl_context *ctx,
goto fail;
/* setup the API dispatch tables with all nop functions */
- ctx->OutsideBeginEnd = _mesa_alloc_dispatch_table();
+ ctx->OutsideBeginEnd = alloc_dispatch_table();
if (!ctx->OutsideBeginEnd)
goto fail;
ctx->Exec = ctx->OutsideBeginEnd;
@@ -1167,7 +1167,7 @@ _mesa_initialize_context(struct gl_context *ctx,
switch (ctx->API) {
case API_OPENGL_COMPAT:
ctx->BeginEnd = create_beginend_table(ctx);
- ctx->Save = _mesa_alloc_dispatch_table();
+ ctx->Save = alloc_dispatch_table();
if (!ctx->BeginEnd || !ctx->Save)
goto fail;
More information about the mesa-commit
mailing list