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 <mattst88@gmail.com> (v1)
Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (v1)
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
Eric Anholt
2013-09-27 11:39:25 -07:00
parent 67caf36489
commit f93533d118
8 changed files with 119 additions and 35 deletions

View File

@@ -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);
};