Bug 3378

Summary: _glapi_add_entrypoint does not generate offset for drivers
Product: DRI Reporter: Ian Romanick <idr>
Component: libGLAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: DRI git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 3377    
Bug Blocks: 1690    

Description Ian Romanick 2005-05-23 13:55:20 UTC
_glapi_add_entrypoint accepts an offset of ~0 for two reaons.  The primary
reason is so that glXGetProcAddress can always return a non-NULL value.  If an
unknown function is requested, a dummy stub will be generated and returned to
the application.  The intention being that a loaded driver will later fill-in
the offset to complete the function.

The other reason is so that drivers can extend the GL API with functions that do
not have statically assigned offsets.  For example, an IHV could add a new,
perhaps experimental, extension.  It would register its functions by calling
'_glapi_add_entrypoint("glNewFunctionIHV", ~0)' and get the actual offset by
calling '_glapi_get_proc_offset("glNewFunctionIHV")'.  This second usage
requires that libGL assign an offset.  Currently, there is NO code to do this. 
If a loaded driver calls _glapi_add_entrypoint with an offset of ~0, the offset
will remain ~0!
Comment 1 Ian Romanick 2005-08-06 04:38:32 UTC
_glapi_add_entrypoint has been removed from the API.  It has been replaced with
_glapi_add_dispatch.  I am closing #3377 and #3378 as fixed.  Any problems
discovered in this new API should have new bugs filed for them.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.