From f93533d118b6dab00022cc9bc1448615a25946dc Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 27 Sep 2013 11:39:25 -0700 Subject: dri: Pass in the dlsym()ed driver extension to screen creation. This will allow a megadrivers build to reference the actual driver being loaded from the shared dri_util screen creation code. v2: Fix indentation, fallback case in EGL (review by Emil). Reviewed-by: Matt Turner (v1) Reviewed-by: Chad Versace (v1) Reviewed-by: Emil Velikov --- include/GL/internal/dri_interface.h | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'include/GL/internal') diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 2122ae9ed48..a7afa224664 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -713,7 +713,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; @@ -749,6 +749,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); + }; /** @@ -831,7 +843,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 */ @@ -939,6 +951,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); }; -- cgit v1.2.3