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