From fcb57a8210e819cc14a39c79f23530eb22296da0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 23 Sep 2013 14:44:10 -0700 Subject: glx: Add an optional function call for getting the DRI driver interface. The previous interface relied on a static struct, which meant that the driver didn't get a chance to edit the struct before the struct got used. For megadrivers, I want struct specific to the driver being loaded. v2: Fix the prototype in the docs (caught by Marek). Since the driver name was in the function, we didn't need to also pass it in. v3: Fix asprintf error checking (caught by Matt's gcc). Reviewed-by: Matt Turner (v1) Reviewed-by: Chad Versace Reviewed-by: Emil Velikov --- include/GL/internal/dri_interface.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/GL') diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 3e54d602065..2122ae9ed48 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -487,6 +487,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 -- cgit v1.2.3