Replace add_newer_entrypoints (src/mesa/main/context.c) with

device-specific code.  A new Python script
(src/mesa/glapi/extension_helper.py) generates a list of all
entry-points for all known extensions.  Each driver the selects only
the extensions that it needs and enables the via either
driInitExtensions or driInitSingleExtension.

This code has been compile-tested on a drivers, but has only been
run-tested on mga and i915 (on i830 hardware).

These changes were discussed at length on the mesa3d-dev mailing list.

http://marc.theaimsgroup.com/?t=111947074700001&r=1&w=2
This commit is contained in:
Ian Romanick
2005-06-30 16:00:48 +00:00
parent 1ac8ae446a
commit c212abf99a
20 changed files with 6699 additions and 487 deletions

View File

@@ -32,12 +32,52 @@
#include "context.h"
#include "dri_util.h"
struct dri_debug_control
{
struct dri_debug_control {
const char * string;
unsigned flag;
};
/**
* Description of the entry-points and parameters for an OpenGL function.
*/
struct dri_extension_function {
/**
* \brief
* Packed string describing the parameter signature and the entry-point
* names.
*
* The parameter signature and the names of the entry-points for this
* function are packed into a single string. The substrings are
* separated by NUL characters. The whole string is terminated by
* two consecutive NUL characters.
*/
const char * strings;
/**
* Offset of the function in the dispatch table.
*/
unsigned offset;
};
/**
* Description of the API for an extension to OpenGL.
*/
struct dri_extension {
/**
* Name of the extension.
*/
const char * name;
/**
* Pointer to a list of \c dri_extension_function structures. The list
* is terminated by a structure with a \c NULL
* \c dri_extension_function::strings pointer.
*/
const struct dri_extension_function * functions;
};
extern unsigned driParseDebugString( const char * debug,
const struct dri_debug_control * control );
@@ -45,7 +85,10 @@ extern unsigned driGetRendererString( char * buffer,
const char * hardware_name, const char * driver_date, GLuint agp_mode );
extern void driInitExtensions( GLcontext * ctx,
const char * const card_extensions[], GLboolean enable_imaging );
const struct dri_extension * card_extensions, GLboolean enable_imaging );
extern void driInitSingleExtension( GLcontext * ctx,
const struct dri_extension * ext );
#ifndef DRI_NEW_INTERFACE_ONLY
extern GLboolean driCheckDriDdxDrmVersions( __DRIscreenPrivate *sPriv,