1 #ifndef EGLDRIVER_INCLUDED
2 #define EGLDRIVER_INCLUDED
5 #include "egltypedefs.h"
7 #include "egldefines.h"
11 * Optional EGL extensions info.
13 struct _egl_extensions
15 EGLBoolean MESA_screen_surface
;
16 EGLBoolean MESA_copy_context
;
18 char String
[_EGL_MAX_EXTENSIONS_LEN
];
23 * Base class for device drivers.
27 EGLBoolean Initialized
; /**< set by driver after initialized */
29 void *LibHandle
; /**< dlopen handle */
30 const char *Path
; /**< path to this driver */
31 const char *Args
; /**< args to load this driver */
33 const char *Name
; /**< name of this driver */
34 /**< probe a display to see if it is supported */
35 EGLBoolean (*Probe
)(_EGLDriver
*drv
, _EGLDisplay
*dpy
);
36 /**< called before dlclose to release this driver */
37 void (*Unload
)(_EGLDriver
*drv
);
39 int APImajor
, APIminor
; /**< as returned by eglInitialize() */
40 char Version
[1000]; /**< initialized from APImajor/minor, Name */
42 /** Bitmask of supported APIs (EGL_xx_BIT) set by the driver during init */
43 EGLint ClientAPIsMask
;
45 _EGLAPI API
; /**< EGL API dispatch table */
47 _EGLExtensions Extensions
;
53 extern _EGLDriver
*_eglMain(_EGLDisplay
*dpy
, const char *args
);
57 _eglChooseDRMDriver(int card
);
61 _eglPreloadDriver(_EGLDisplay
*dpy
);
65 _eglOpenDriver(_EGLDisplay
*dpy
);
69 _eglCloseDriver(_EGLDriver
*drv
, _EGLDisplay
*dpy
);
73 _eglUnloadDrivers(void);
77 _eglLookupDriver(EGLDisplay d
);
81 _eglInitDriverFallbacks(_EGLDriver
*drv
);
88 #endif /* EGLDRIVER_INCLUDED */