diff options
Diffstat (limited to 'gl/internal')
-rw-r--r-- | gl/internal/dri_interface.h | 77 |
1 files changed, 69 insertions, 8 deletions
diff --git a/gl/internal/dri_interface.h b/gl/internal/dri_interface.h index 1fd02ebf5..f074dbe44 100644 --- a/gl/internal/dri_interface.h +++ b/gl/internal/dri_interface.h @@ -332,12 +332,6 @@ struct __DRI2throttleExtensionRec { enum __DRI2throttleReason reason); }; -/** - * XML document describing the configuration options supported by the - * driver. - */ -extern const char __driConfigOptions[]; - /*@}*/ /** @@ -498,6 +492,19 @@ struct __DRIuseInvalidateExtensionRec { #define __DRI_DRIVER_EXTENSIONS "__driDriverExtensions" /** + * This symbol replaces the __DRI_DRIVER_EXTENSIONS symbol, and will be + * suffixed by "_drivername", allowing multiple drivers to be built into one + * library, and also giving the driver the chance to return a variable driver + * extensions struct depending on the driver name being loaded or any other + * system state. + * + * The function prototype is: + * + * const __DRIextension **__driDriverGetExtensions_drivername(void); + */ +#define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions" + +/** * Tokens for __DRIconfig attribs. A number of attributes defined by * GLX or EGL standards are not in the table, as they must be provided * by the loader. For example, FBConfig ID or visual ID, drawable type. @@ -710,7 +717,7 @@ struct __DRIlegacyExtensionRec { * conjunction with the core extension. */ #define __DRI_SWRAST "DRI_SWRast" -#define __DRI_SWRAST_VERSION 3 +#define __DRI_SWRAST_VERSION 4 struct __DRIswrastExtensionRec { __DRIextension base; @@ -746,6 +753,18 @@ struct __DRIswrastExtensionRec { const uint32_t *attribs, unsigned *error, void *loaderPrivate); + + /** + * createNewScreen() with the driver extensions passed in. + * + * \since version 4 + */ + __DRIscreen *(*createNewScreen2)(int screen, + const __DRIextension **loader_extensions, + const __DRIextension **driver_extensions, + const __DRIconfig ***driver_configs, + void *loaderPrivate); + }; /** @@ -828,7 +847,7 @@ struct __DRIdri2LoaderExtensionRec { * constructors for DRI2. */ #define __DRI_DRI2 "DRI_DRI2" -#define __DRI_DRI2_VERSION 3 +#define __DRI_DRI2_VERSION 4 #define __DRI_API_OPENGL 0 /**< OpenGL compatibility profile */ #define __DRI_API_GLES 1 /**< OpenGL ES 1.x */ @@ -936,6 +955,17 @@ struct __DRIdri2ExtensionRec { const uint32_t *attribs, unsigned *error, void *loaderPrivate); + + /** + * createNewScreen with the driver's extension list passed in. + * + * \since version 4 + */ + __DRIscreen *(*createNewScreen2)(int screen, int fd, + const __DRIextension **loader_extensions, + const __DRIextension **driver_extensions, + const __DRIconfig ***driver_configs, + void *loaderPrivate); }; @@ -1230,4 +1260,35 @@ struct __DRIrobustnessExtensionRec { __DRIextension base; }; +/** + * DRI config options extension. + * + * This extension provides the XML string containing driver options for use by + * the loader in supporting the driconf application. + */ +#define __DRI_CONFIG_OPTIONS "DRI_ConfigOptions" +#define __DRI_CONFIG_OPTIONS_VERSION 1 + +typedef struct __DRIconfigOptionsExtensionRec { + __DRIextension base; + const char *xml; +} __DRIconfigOptionsExtension; + +/** + * This extension provides a driver vtable to a set of common driver helper + * functions (driCoreExtension, driDRI2Extension) within the driver + * implementation, as opposed to having to pass them through a global + * variable. + * + * It is not intended to be public API to the actual loader, and the vtable + * layout may change at any time. + */ +#define __DRI_DRIVER_VTABLE "DRI_DriverVtable" +#define __DRI_DRIVER_VTABLE_VERSION 1 + +typedef struct __DRIDriverVtableExtensionRec { + __DRIextension base; + const struct __DriverAPIRec *vtable; +} __DRIDriverVtableExtension; + #endif |