4573c50ea6ab91c41c899c004083d9490e92556b
1 #ifndef EGLDRI_INCLUDED
2 #define EGLDRI_INCLUDED
4 #include "egldisplay.h"
6 #include "eglsurface.h"
7 #include "eglcontext.h"
10 #include "drm_sarea.h"
13 * dri display-specific driver class derived from _EGLDisplay
15 typedef struct dri_display
17 _EGLDisplay Base
; /* base class/object */
19 int drmFD
; /**< \brief DRM device file descriptor */
21 unsigned long hFrameBuffer
;
31 unsigned int serverContext
; /**< \brief DRM context only active on server */
32 unsigned long FBStart
; /**< \brief physical address of the framebuffer */
33 void *driverClientMsg
;
34 int driverClientMsgSize
;
39 __GLcontextModes
*driver_modes
;
40 __DRIscreen driScreen
;
45 * dri driver-specific screen class derived from _EGLScreen
47 typedef struct dri_screen
55 * dri driver-specific surface class derived from _EGLSurface
57 typedef struct dri_surface
59 _EGLSurface Base
; /* base class/object */
60 __DRIdrawable drawable
;
65 * dri driver-specific context class derived from _EGLContext
67 typedef struct dri_context
69 _EGLContext Base
; /* base class/object */
70 __DRIcontext driContext
; /**< \brief context dependent methods */
75 static inline driDisplay
*
76 Lookup_driDisplay(EGLDisplay dpy
)
78 _EGLDisplay
*d
= _eglLookupDisplay(dpy
);
79 return (driDisplay
*) d
;
83 static inline driScreen
*
84 Lookup_driScreen(EGLDisplay dpy
, EGLScreenMESA screen
)
86 _EGLScreen
*s
= _eglLookupScreen(dpy
, screen
);
87 return (driScreen
*) s
;
91 static inline driContext
*
92 Lookup_driContext(EGLContext ctx
)
94 _EGLContext
*c
= _eglLookupContext(ctx
);
95 return (driContext
*) c
;
99 static inline driSurface
*
100 Lookup_driSurface(EGLSurface surf
)
102 _EGLSurface
*s
= _eglLookupSurface(surf
);
103 return (driSurface
*) s
;
106 extern void _eglDRIInitDriverFallbacks(_EGLDriver
*drv
);
107 extern EGLBoolean
_eglDRIShowSurfaceMESA(_EGLDriver
*drv
, EGLDisplay dpy
, EGLScreenMESA screen
, EGLSurface surface
, EGLModeMESA m
);
108 extern EGLBoolean
_eglDRIInitialize(_EGLDriver
*drv
, EGLDisplay dpy
, EGLint
*major
, EGLint
*minor
);
109 extern EGLBoolean
_eglDRIGetDisplayInfo(driDisplay
*dpy
);
110 extern EGLBoolean
_eglDRICreateDisplay(driDisplay
*dpy
, __DRIframebuffer
*framebuffer
);
111 extern EGLBoolean
_eglDRICreateScreen(driDisplay
*dpy
);
113 #endif /* EGLDRI_INCLUDED */