Commit | Line | Data |
---|---|---|
d42e7319 JB |
1 | /************************************************************************** |
2 | * | |
3 | * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | |
4 | * All Rights Reserved. | |
5 | * | |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | |
7 | * copy of this software and associated documentation files (the | |
8 | * "Software"), to deal in the Software without restriction, including | |
9 | * without limitation the rights to use, copy, modify, merge, publish, | |
10 | * distribute, sub license, and/or sell copies of the Software, and to | |
11 | * permit persons to whom the Software is furnished to do so, subject to | |
12 | * the following conditions: | |
13 | * | |
14 | * The above copyright notice and this permission notice (including the | |
15 | * next paragraph) shall be included in all copies or substantial portions | |
16 | * of the Software. | |
17 | * | |
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |
21 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
24 | * DEALINGS IN THE SOFTWARE. | |
25 | * | |
26 | **************************************************************************/ | |
27 | ||
28 | #ifndef __eglmesaext_h_ | |
29 | #define __eglmesaext_h_ | |
30 | ||
31 | #ifdef __cplusplus | |
32 | extern "C" { | |
33 | #endif | |
34 | ||
35 | #include <EGL/eglplatform.h> | |
36 | ||
37 | /* EGL_MESA_screen extension >>> PRELIMINARY <<< */ | |
38 | #ifndef EGL_MESA_screen_surface | |
39 | #define EGL_MESA_screen_surface 1 | |
40 | ||
41 | #define EGL_BAD_SCREEN_MESA 0x4000 | |
42 | #define EGL_BAD_MODE_MESA 0x4001 | |
43 | #define EGL_SCREEN_COUNT_MESA 0x4002 | |
44 | #define EGL_SCREEN_POSITION_MESA 0x4003 | |
45 | #define EGL_SCREEN_POSITION_GRANULARITY_MESA 0x4004 | |
46 | #define EGL_MODE_ID_MESA 0x4005 | |
47 | #define EGL_REFRESH_RATE_MESA 0x4006 | |
48 | #define EGL_OPTIMAL_MESA 0x4007 | |
49 | #define EGL_INTERLACED_MESA 0x4008 | |
50 | #define EGL_SCREEN_BIT_MESA 0x08 | |
51 | ||
52 | typedef khronos_uint32_t EGLScreenMESA; | |
53 | typedef khronos_uint32_t EGLModeMESA; | |
54 | ||
55 | #ifdef EGL_EGLEXT_PROTOTYPES | |
56 | EGLAPI EGLBoolean EGLAPIENTRY eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); | |
57 | EGLAPI EGLBoolean EGLAPIENTRY eglGetModesMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); | |
58 | EGLAPI EGLBoolean EGLAPIENTRY eglGetModeAttribMESA(EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value); | |
59 | EGLAPI EGLBoolean EGLAPIENTRY eglGetScreensMESA(EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); | |
60 | EGLAPI EGLSurface EGLAPIENTRY eglCreateScreenSurfaceMESA(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); | |
61 | EGLAPI EGLBoolean EGLAPIENTRY eglShowScreenSurfaceMESA(EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode); | |
62 | EGLAPI EGLBoolean EGLAPIENTRY eglScreenPositionMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); | |
63 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); | |
64 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenSurfaceMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface); | |
65 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenModeMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); | |
66 | EGLAPI const char * EGLAPIENTRY eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode); | |
67 | #endif /* EGL_EGLEXT_PROTOTYPES */ | |
68 | ||
69 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLCHOOSEMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); | |
70 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMODESMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); | |
71 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLGetModeATTRIBMESA) (EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value); | |
72 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSCRREENSMESA) (EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); | |
73 | typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESCREENSURFACEMESA) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); | |
74 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSHOWSCREENSURFACEMESA) (EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode); | |
75 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSCREENPOSIITONMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); | |
76 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); | |
77 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENSURFACEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface); | |
78 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); | |
79 | typedef const char * (EGLAPIENTRYP PFNEGLQUERYMODESTRINGMESA) (EGLDisplay dpy, EGLModeMESA mode); | |
80 | ||
81 | #endif /* EGL_MESA_screen_surface */ | |
82 | ||
83 | #ifndef EGL_MESA_copy_context | |
84 | #define EGL_MESA_copy_context 1 | |
85 | ||
86 | #ifdef EGL_EGLEXT_PROTOTYPES | |
87 | EGLAPI EGLBoolean EGLAPIENTRY eglCopyContextMESA(EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); | |
88 | #endif /* EGL_EGLEXT_PROTOTYPES */ | |
89 | ||
90 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYCONTEXTMESA) (EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); | |
91 | ||
92 | #endif /* EGL_MESA_copy_context */ | |
93 | ||
94 | #ifndef EGL_MESA_drm_display | |
95 | #define EGL_MESA_drm_display 1 | |
96 | ||
97 | #ifdef EGL_EGLEXT_PROTOTYPES | |
98 | EGLAPI EGLDisplay EGLAPIENTRY eglGetDRMDisplayMESA(int fd); | |
99 | #endif /* EGL_EGLEXT_PROTOTYPES */ | |
100 | ||
101 | typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd); | |
102 | ||
103 | #endif /* EGL_MESA_drm_display */ | |
104 | ||
105 | #ifdef EGL_MESA_drm_image | |
106 | /* Mesa's extension to EGL_MESA_drm_image... */ | |
107 | #ifndef EGL_DRM_BUFFER_USE_CURSOR_MESA | |
108 | #define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004 | |
109 | #endif | |
110 | #endif | |
111 | ||
112 | #ifndef EGL_WL_bind_wayland_display | |
113 | #define EGL_WL_bind_wayland_display 1 | |
114 | ||
115 | #define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */ | |
116 | #define EGL_WAYLAND_PLANE_WL 0x31D6 /* eglCreateImageKHR target */ | |
117 | ||
118 | #define EGL_WAYLAND_Y_INVERTED_WL 0x31DB /* eglQueryWaylandBufferWL attribute */ | |
119 | ||
120 | #define EGL_TEXTURE_Y_U_V_WL 0x31D7 | |
121 | #define EGL_TEXTURE_Y_UV_WL 0x31D8 | |
122 | #define EGL_TEXTURE_Y_XUXV_WL 0x31D9 | |
123 | #define EGL_TEXTURE_EXTERNAL_WL 0x31DA | |
124 | ||
125 | struct wl_display; | |
126 | struct wl_resource; | |
127 | #ifdef EGL_EGLEXT_PROTOTYPES | |
128 | EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); | |
129 | EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); | |
130 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); | |
131 | #endif | |
132 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); | |
133 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); | |
134 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); | |
135 | ||
136 | #endif | |
137 | ||
138 | #ifndef EGL_WL_create_wayland_buffer_from_image | |
139 | #define EGL_WL_create_wayland_buffer_from_image 1 | |
140 | ||
141 | #ifdef EGL_EGLEXT_PROTOTYPES | |
142 | EGLAPI struct wl_buffer * EGLAPIENTRY eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image); | |
143 | #endif | |
144 | typedef struct wl_buffer * (EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) (EGLDisplay dpy, EGLImageKHR image); | |
145 | ||
146 | #endif | |
147 | ||
148 | #ifndef EGL_NOK_swap_region | |
149 | #define EGL_NOK_swap_region 1 | |
150 | ||
151 | #ifdef EGL_EGLEXT_PROTOTYPES | |
152 | EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects); | |
153 | #endif | |
154 | ||
155 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects); | |
156 | #endif | |
157 | ||
158 | #ifndef EGL_NOK_texture_from_pixmap | |
159 | #define EGL_NOK_texture_from_pixmap 1 | |
160 | ||
161 | #define EGL_Y_INVERTED_NOK 0x307F | |
162 | #endif /* EGL_NOK_texture_from_pixmap */ | |
163 | ||
164 | #ifndef EGL_ANDROID_image_native_buffer | |
165 | #define EGL_ANDROID_image_native_buffer 1 | |
166 | #define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */ | |
167 | #endif | |
168 | ||
169 | #ifdef __cplusplus | |
170 | } | |
171 | #endif | |
172 | ||
173 | #endif |