diff options
author | George Sapountzis <[email protected]> | 2010-03-08 01:18:31 +0200 |
---|---|---|
committer | George Sapountzis <[email protected]> | 2010-03-10 18:44:45 +0200 |
commit | f9cc6b3ee7c95130992d67c080ff9bc8e8a6d789 (patch) | |
tree | d56211da2402de1f5a9ae15e8c7dc46973d6167b /src/mesa/glapi | |
parent | f0c18da2cf01bc11dc720caed4590ae7eca128f1 (diff) |
glapi: use get_extension_proc in _glapi_add_dispatch
Diffstat (limited to 'src/mesa/glapi')
-rw-r--r-- | src/mesa/glapi/glapi_getproc.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mesa/glapi/glapi_getproc.c index 1514b91ffee..1d0389e0574 100644 --- a/src/mesa/glapi/glapi_getproc.c +++ b/src/mesa/glapi/glapi_getproc.c @@ -368,7 +368,6 @@ _glapi_add_dispatch( const char * const * function_names, struct _glapi_function * entry[8]; GLboolean is_static[8]; unsigned i; - unsigned j; int offset = ~0; int new_offset; @@ -403,28 +402,25 @@ _glapi_add_dispatch( const char * const * function_names, } - for ( j = 0 ; j < NumExtEntryPoints ; j++ ) { - if (strcmp(ExtEntryTable[j].name, function_names[i]) == 0) { + entry[i] = get_extension_proc(function_names[i]); + + if (entry[i] != NULL) { + /* The offset may be ~0 if the function name was added by * glXGetProcAddress but never filled in by the driver. */ - if (ExtEntryTable[j].dispatch_offset != ~0) { - if (strcmp(real_sig, ExtEntryTable[j].parameter_signature) - != 0) { + if (entry[i]->dispatch_offset != ~0) { + if (strcmp(real_sig, entry[i]->parameter_signature) != 0) { return -1; } - if ( (offset != ~0) && (ExtEntryTable[j].dispatch_offset != offset) ) { + if ( (offset != ~0) && (entry[i]->dispatch_offset != offset) ) { return -1; } - offset = ExtEntryTable[j].dispatch_offset; + offset = entry[i]->dispatch_offset; } - - entry[i] = & ExtEntryTable[j]; - break; - } } } |