summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2011-03-02 10:20:02 -0500
committerAdam Jackson <ajax@redhat.com>2011-03-08 13:21:56 -0500
commita5fdd1aa06c7c8ecefeafafc4a778fc816ad41a4 (patch)
treed619fb82db9aa1ecd8892cd984a812f6ea70e8f4
parent2cb3dc020cbec1ba64848dac532b3bb2d84d0635 (diff)
glx: Remove unused _glapi_get_proc_offset and friends
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--glx/glapi.c107
-rw-r--r--glx/glapi.h19
2 files changed, 0 insertions, 126 deletions
diff --git a/glx/glapi.c b/glx/glapi.c
index d6a568e88..42bf6c166 100644
--- a/glx/glapi.c
+++ b/glx/glapi.c
@@ -336,11 +336,6 @@ _glapi_set_dispatch(struct _glapi_table *dispatch)
/* use the no-op functions */
dispatch = (struct _glapi_table *) __glapi_noop_table;
}
-#ifdef DEBUG
- else {
- _glapi_check_table(dispatch);
- }
-#endif
#if defined(GLX_USE_TLS)
_glapi_tls_Dispatch = dispatch;
@@ -867,26 +862,6 @@ _glapi_add_dispatch( const char * const * function_names,
return offset;
}
-
-/**
- * Return offset of entrypoint for named function within dispatch table.
- */
-PUBLIC GLint
-_glapi_get_proc_offset(const char *funcName)
-{
- /* search extension functions first */
- GLuint i;
- for (i = 0; i < NumExtEntryPoints; i++) {
- if (strcmp(ExtEntryTable[i].name, funcName) == 0) {
- return ExtEntryTable[i].dispatch_offset;
- }
- }
- /* search static functions */
- return get_static_proc_offset(funcName);
-}
-
-
-
/**
* Return pointer to the named function. If the function name isn't found
* in the name of static functions, try generating a new API entrypoint on
@@ -965,88 +940,6 @@ _glapi_get_dispatch_table_size(void)
return DISPATCH_TABLE_SIZE;
}
-
-
-/**
- * Make sure there are no NULL pointers in the given dispatch table.
- * Intended for debugging purposes.
- */
-void
-_glapi_check_table(const struct _glapi_table *table)
-{
-#ifdef DEBUG
- const GLuint entries = _glapi_get_dispatch_table_size();
- const void **tab = (const void **) table;
- GLuint i;
- for (i = 1; i < entries; i++) {
- assert(tab[i]);
- }
-
- /* Do some spot checks to be sure that the dispatch table
- * slots are assigned correctly.
- */
- {
- GLuint BeginOffset = _glapi_get_proc_offset("glBegin");
- char *BeginFunc = (char*) &table->Begin;
- GLuint offset = (BeginFunc - (char *) table) / sizeof(void *);
- assert(BeginOffset == _gloffset_Begin);
- assert(BeginOffset == offset);
- }
- {
- GLuint viewportOffset = _glapi_get_proc_offset("glViewport");
- char *viewportFunc = (char*) &table->Viewport;
- GLuint offset = (viewportFunc - (char *) table) / sizeof(void *);
- assert(viewportOffset == _gloffset_Viewport);
- assert(viewportOffset == offset);
- }
- {
- GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer");
- char *VertexPointerFunc = (char*) &table->VertexPointer;
- GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *);
- assert(VertexPointerOffset == _gloffset_VertexPointer);
- assert(VertexPointerOffset == offset);
- }
- {
- GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax");
- char *ResetMinMaxFunc = (char*) &table->ResetMinmax;
- GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *);
- assert(ResetMinMaxOffset == _gloffset_ResetMinmax);
- assert(ResetMinMaxOffset == offset);
- }
- {
- GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor");
- char *blendColorFunc = (char*) &table->BlendColor;
- GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *);
- assert(blendColorOffset == _gloffset_BlendColor);
- assert(blendColorOffset == offset);
- }
- {
- GLuint secondaryColor3fOffset = _glapi_get_proc_offset("glSecondaryColor3fEXT");
- char *secondaryColor3fFunc = (char*) &table->SecondaryColor3fEXT;
- GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *);
- assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT);
- assert(secondaryColor3fOffset == offset);
- }
- {
- GLuint pointParameterivOffset = _glapi_get_proc_offset("glPointParameterivNV");
- char *pointParameterivFunc = (char*) &table->PointParameterivNV;
- GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *);
- assert(pointParameterivOffset == _gloffset_PointParameterivNV);
- assert(pointParameterivOffset == offset);
- }
- {
- GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV");
- char *setFenceFunc = (char*) &table->SetFenceNV;
- GLuint offset = (setFenceFunc - (char *) table) / sizeof(void *);
- assert(setFenceOffset == _gloffset_SetFenceNV);
- assert(setFenceOffset == offset);
- }
-#else
- (void) table;
-#endif
-}
-
-
#if defined(PTHREADS) || defined(GLX_USE_TLS)
/**
* Perform platform-specific GL API entry-point fixups.
diff --git a/glx/glapi.h b/glx/glapi.h
index 8f2cf6621..9911e50f0 100644
--- a/glx/glapi.h
+++ b/glx/glapi.h
@@ -115,57 +115,38 @@ _glapi_set_warning_func(_glapi_warning_func func);
extern void
_glapi_check_multithread(void);
-
extern void
_glapi_set_context(void *context);
-
extern void *
_glapi_get_context(void);
-
extern void
_glapi_set_dispatch(struct _glapi_table *dispatch);
-
extern struct _glapi_table *
_glapi_get_dispatch(void);
-
extern int
_glapi_begin_dispatch_override(struct _glapi_table *override);
-
extern void
_glapi_end_dispatch_override(int layer);
-
struct _glapi_table *
_glapi_get_override_dispatch(int layer);
-
extern GLuint
_glapi_get_dispatch_table_size(void);
-
-extern void
-_glapi_check_table(const struct _glapi_table *table);
-
-
extern int
_glapi_add_dispatch( const char * const * function_names,
const char * parameter_signature );
-extern GLint
-_glapi_get_proc_offset(const char *funcName);
-
-
extern _glapi_proc
_glapi_get_proc_address(const char *funcName);
-
extern const char *
_glapi_get_proc_name(GLuint offset);
-
#endif