eglmesaext.h revision 848b8605
1848b8605Smrg/************************************************************************** 2848b8605Smrg * 3848b8605Smrg * Copyright 2008 VMware, Inc. 4848b8605Smrg * All Rights Reserved. 5848b8605Smrg * 6848b8605Smrg * Permission is hereby granted, free of charge, to any person obtaining a 7848b8605Smrg * copy of this software and associated documentation files (the 8848b8605Smrg * "Software"), to deal in the Software without restriction, including 9848b8605Smrg * without limitation the rights to use, copy, modify, merge, publish, 10848b8605Smrg * distribute, sub license, and/or sell copies of the Software, and to 11848b8605Smrg * permit persons to whom the Software is furnished to do so, subject to 12848b8605Smrg * the following conditions: 13848b8605Smrg * 14848b8605Smrg * The above copyright notice and this permission notice (including the 15848b8605Smrg * next paragraph) shall be included in all copies or substantial portions 16848b8605Smrg * of the Software. 17848b8605Smrg * 18848b8605Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19848b8605Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20848b8605Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21848b8605Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22848b8605Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23848b8605Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24848b8605Smrg * DEALINGS IN THE SOFTWARE. 25848b8605Smrg * 26848b8605Smrg **************************************************************************/ 27848b8605Smrg 28848b8605Smrg#ifndef __eglmesaext_h_ 29848b8605Smrg#define __eglmesaext_h_ 30848b8605Smrg 31848b8605Smrg#ifdef __cplusplus 32848b8605Smrgextern "C" { 33848b8605Smrg#endif 34848b8605Smrg 35848b8605Smrg#include <EGL/eglplatform.h> 36848b8605Smrg 37848b8605Smrg/* EGL_MESA_screen extension >>> PRELIMINARY <<< */ 38848b8605Smrg#ifndef EGL_MESA_screen_surface 39848b8605Smrg#define EGL_MESA_screen_surface 1 40848b8605Smrg 41848b8605Smrg#define EGL_BAD_SCREEN_MESA 0x4000 42848b8605Smrg#define EGL_BAD_MODE_MESA 0x4001 43848b8605Smrg#define EGL_SCREEN_COUNT_MESA 0x4002 44848b8605Smrg#define EGL_SCREEN_POSITION_MESA 0x4003 45848b8605Smrg#define EGL_SCREEN_POSITION_GRANULARITY_MESA 0x4004 46848b8605Smrg#define EGL_MODE_ID_MESA 0x4005 47848b8605Smrg#define EGL_REFRESH_RATE_MESA 0x4006 48848b8605Smrg#define EGL_OPTIMAL_MESA 0x4007 49848b8605Smrg#define EGL_INTERLACED_MESA 0x4008 50848b8605Smrg#define EGL_SCREEN_BIT_MESA 0x08 51848b8605Smrg 52848b8605Smrgtypedef khronos_uint32_t EGLScreenMESA; 53848b8605Smrgtypedef khronos_uint32_t EGLModeMESA; 54848b8605Smrg 55848b8605Smrg#ifdef EGL_EGLEXT_PROTOTYPES 56848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); 57848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglGetModesMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); 58848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglGetModeAttribMESA(EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value); 59848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglGetScreensMESA(EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); 60848b8605SmrgEGLAPI EGLSurface EGLAPIENTRY eglCreateScreenSurfaceMESA(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); 61848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglShowScreenSurfaceMESA(EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode); 62848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglScreenPositionMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); 63848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); 64848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenSurfaceMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface); 65848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenModeMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); 66848b8605SmrgEGLAPI const char * EGLAPIENTRY eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode); 67848b8605Smrg#endif /* EGL_EGLEXT_PROTOTYPES */ 68848b8605Smrg 69848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLCHOOSEMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); 70848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMODESMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); 71848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLGetModeATTRIBMESA) (EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value); 72848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSCRREENSMESA) (EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); 73848b8605Smrgtypedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESCREENSURFACEMESA) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); 74848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLSHOWSCREENSURFACEMESA) (EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode); 75848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLSCREENPOSIITONMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); 76848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); 77848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENSURFACEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface); 78848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); 79848b8605Smrgtypedef const char * (EGLAPIENTRYP PFNEGLQUERYMODESTRINGMESA) (EGLDisplay dpy, EGLModeMESA mode); 80848b8605Smrg 81848b8605Smrg#endif /* EGL_MESA_screen_surface */ 82848b8605Smrg 83848b8605Smrg#ifndef EGL_MESA_copy_context 84848b8605Smrg#define EGL_MESA_copy_context 1 85848b8605Smrg 86848b8605Smrg#ifdef EGL_EGLEXT_PROTOTYPES 87848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglCopyContextMESA(EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); 88848b8605Smrg#endif /* EGL_EGLEXT_PROTOTYPES */ 89848b8605Smrg 90848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYCONTEXTMESA) (EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); 91848b8605Smrg 92848b8605Smrg#endif /* EGL_MESA_copy_context */ 93848b8605Smrg 94848b8605Smrg#ifndef EGL_MESA_drm_display 95848b8605Smrg#define EGL_MESA_drm_display 1 96848b8605Smrg 97848b8605Smrg#ifdef EGL_EGLEXT_PROTOTYPES 98848b8605SmrgEGLAPI EGLDisplay EGLAPIENTRY eglGetDRMDisplayMESA(int fd); 99848b8605Smrg#endif /* EGL_EGLEXT_PROTOTYPES */ 100848b8605Smrg 101848b8605Smrgtypedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd); 102848b8605Smrg 103848b8605Smrg#endif /* EGL_MESA_drm_display */ 104848b8605Smrg 105848b8605Smrg#ifdef EGL_MESA_drm_image 106848b8605Smrg/* Mesa's extension to EGL_MESA_drm_image... */ 107848b8605Smrg#ifndef EGL_DRM_BUFFER_USE_CURSOR_MESA 108848b8605Smrg#define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004 109848b8605Smrg#endif 110848b8605Smrg#endif 111848b8605Smrg 112848b8605Smrg#ifndef EGL_WL_bind_wayland_display 113848b8605Smrg#define EGL_WL_bind_wayland_display 1 114848b8605Smrg 115848b8605Smrg#define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */ 116848b8605Smrg#define EGL_WAYLAND_PLANE_WL 0x31D6 /* eglCreateImageKHR target */ 117848b8605Smrg 118848b8605Smrg#define EGL_WAYLAND_Y_INVERTED_WL 0x31DB /* eglQueryWaylandBufferWL attribute */ 119848b8605Smrg 120848b8605Smrg#define EGL_TEXTURE_Y_U_V_WL 0x31D7 121848b8605Smrg#define EGL_TEXTURE_Y_UV_WL 0x31D8 122848b8605Smrg#define EGL_TEXTURE_Y_XUXV_WL 0x31D9 123848b8605Smrg 124848b8605Smrgstruct wl_display; 125848b8605Smrgstruct wl_resource; 126848b8605Smrg#ifdef EGL_EGLEXT_PROTOTYPES 127848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); 128848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); 129848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); 130848b8605Smrg#endif 131848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); 132848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); 133848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); 134848b8605Smrg 135848b8605Smrg#endif 136848b8605Smrg 137848b8605Smrg#ifndef EGL_WL_create_wayland_buffer_from_image 138848b8605Smrg#define EGL_WL_create_wayland_buffer_from_image 1 139848b8605Smrg 140848b8605Smrg#ifdef EGL_EGLEXT_PROTOTYPES 141848b8605SmrgEGLAPI struct wl_buffer * EGLAPIENTRY eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image); 142848b8605Smrg#endif 143848b8605Smrgtypedef struct wl_buffer * (EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) (EGLDisplay dpy, EGLImageKHR image); 144848b8605Smrg 145848b8605Smrg#endif 146848b8605Smrg 147848b8605Smrg#ifndef EGL_NOK_swap_region 148848b8605Smrg#define EGL_NOK_swap_region 1 149848b8605Smrg 150848b8605Smrg#ifdef EGL_EGLEXT_PROTOTYPES 151848b8605SmrgEGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects); 152848b8605Smrg#endif 153848b8605Smrg 154848b8605Smrgtypedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects); 155848b8605Smrg#endif 156848b8605Smrg 157848b8605Smrg#ifndef EGL_NOK_texture_from_pixmap 158848b8605Smrg#define EGL_NOK_texture_from_pixmap 1 159848b8605Smrg 160848b8605Smrg#define EGL_Y_INVERTED_NOK 0x307F 161848b8605Smrg#endif /* EGL_NOK_texture_from_pixmap */ 162848b8605Smrg 163848b8605Smrg#ifndef EGL_ANDROID_image_native_buffer 164848b8605Smrg#define EGL_ANDROID_image_native_buffer 1 165848b8605Smrg#define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */ 166848b8605Smrg#endif 167848b8605Smrg 168848b8605Smrg#ifndef EGL_MESA_configless_context 169848b8605Smrg#define EGL_MESA_configless_context 1 170848b8605Smrg#define EGL_NO_CONFIG_MESA ((EGLConfig)0) 171848b8605Smrg#endif 172848b8605Smrg 173848b8605Smrg#ifdef __cplusplus 174848b8605Smrg} 175848b8605Smrg#endif 176848b8605Smrg 177848b8605Smrg#endif 178