diff options
author | Ian Romanick <[email protected]> | 2006-08-11 23:56:37 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2006-08-11 23:56:37 +0000 |
commit | 8fbe16d4dd0664f7766f5241c055efb582cc06e5 (patch) | |
tree | 8648d4740b823c3103ac66b90e9339a60b16862c /src/mesa/drivers/dri/common/utils.c | |
parent | 56f349515c75a93923255ba1eb7cdae67b432a53 (diff) |
Fix long standing bug that prevented newer drivers from working with
older libGL. The data in extension_helper.h erroneous instructed
drivers to expect all functions with establised offsets, even those
not in the ABI, to have a specific offset allocated. This is just
wrong. A function is either in the ABI and has a set offset or a
function is not in the ABI and has a re-map offset.
Diffstat (limited to 'src/mesa/drivers/dri/common/utils.c')
-rw-r--r-- | src/mesa/drivers/dri/common/utils.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index e3eca86da1b..74ed299a628 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -309,15 +309,17 @@ void driInitSingleExtension( GLcontext * ctx, /* Add each entry-point to the dispatch table. */ offset = _glapi_add_dispatch( functions, parameter_signature ); - if ( ext->functions[i].remap_index != -1 ) { - driDispatchRemapTable[ ext->functions[i].remap_index ] = offset; + if (offset == -1) { + fprintf(stderr, "DISPATCH ERROR! _glapi_add_dispatch failed " + "to add %s!\n", functions[0]); } - - if ( (ext->functions[i].offset != -1) - && (ext->functions[i].offset != offset) ) { - fprintf(stderr, "DISPATCH ERROR! %s -> %u != %u\n", functions[0], - driDispatchRemapTable[ ext->functions[i].remap_index ], - ext->functions[i].offset); + else if (ext->functions[i].remap_index != -1) { + driDispatchRemapTable[ ext->functions[i].remap_index ] = + offset; + } + else if (ext->functions[i].offset != offset) { + fprintf(stderr, "DISPATCH ERROR! %s -> %u != %u\n", + functions[0], offset, ext->functions[i].offset); } } } |