aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main/egldriver.h
blob: 67cfb02f46aa66c56ac0e22d2f0c581e2cf37766 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef EGLDRIVER_INCLUDED
#define EGLDRIVER_INCLUDED


#include "egltypedefs.h"
#include "eglapi.h"
#include "egldefines.h"


/**
 * Optional EGL extensions info.
 */
struct _egl_extensions
{
   EGLBoolean MESA_screen_surface;
   EGLBoolean MESA_copy_context;

   char String[_EGL_MAX_EXTENSIONS_LEN];
};


/**
 * Base class for device drivers.
 */
struct _egl_driver
{
   EGLBoolean Initialized; /* set by driver after initialized */

   void *LibHandle; /* dlopen handle */

   _EGLDisplay *Display;

   int ABIversion;
   int APImajor, APIminor; /* returned through eglInitialize */
   const char *ClientAPIs;

   _EGLAPI API;

   _EGLExtensions Extensions;
};


extern _EGLDriver *_eglMain(_EGLDisplay *dpy, const char *args);


extern const char *
_eglChooseDriver(_EGLDisplay *dpy);


extern _EGLDriver *
_eglOpenDriver(_EGLDisplay *dpy, const char *driverName, const char *args);


extern EGLBoolean
_eglCloseDriver(_EGLDriver *drv, EGLDisplay dpy);


extern _EGLDriver *
_eglLookupDriver(EGLDisplay d);


extern void
_eglInitDriverFallbacks(_EGLDriver *drv);


extern const char *
_eglQueryString(_EGLDriver *drv, EGLDisplay dpy, EGLint name);


extern EGLBoolean
_eglWaitGL(_EGLDriver *drv, EGLDisplay dpy);


extern EGLBoolean
_eglWaitNative(_EGLDriver *drv, EGLDisplay dpy, EGLint engine);



#endif /* EGLDRIVER_INCLUDED */