eglmesaext.h 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. #ifndef __eglmesaext_h_
  28. #define __eglmesaext_h_
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32. #include <EGL/eglplatform.h>
  33. /* EGL_MESA_screen extension >>> PRELIMINARY <<< */
  34. #ifndef EGL_MESA_screen_surface
  35. #define EGL_MESA_screen_surface 1
  36. #define EGL_BAD_SCREEN_MESA 0x4000
  37. #define EGL_BAD_MODE_MESA 0x4001
  38. #define EGL_SCREEN_COUNT_MESA 0x4002
  39. #define EGL_SCREEN_POSITION_MESA 0x4003
  40. #define EGL_SCREEN_POSITION_GRANULARITY_MESA 0x4004
  41. #define EGL_MODE_ID_MESA 0x4005
  42. #define EGL_REFRESH_RATE_MESA 0x4006
  43. #define EGL_OPTIMAL_MESA 0x4007
  44. #define EGL_INTERLACED_MESA 0x4008
  45. #define EGL_SCREEN_BIT_MESA 0x08
  46. typedef khronos_uint32_t EGLScreenMESA;
  47. typedef khronos_uint32_t EGLModeMESA;
  48. #ifdef EGL_EGLEXT_PROTOTYPES
  49. EGLAPI EGLBoolean EGLAPIENTRY eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
  50. EGLAPI EGLBoolean EGLAPIENTRY eglGetModesMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
  51. EGLAPI EGLBoolean EGLAPIENTRY eglGetModeAttribMESA(EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value);
  52. EGLAPI EGLBoolean EGLAPIENTRY eglGetScreensMESA(EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens);
  53. EGLAPI EGLSurface EGLAPIENTRY eglCreateScreenSurfaceMESA(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
  54. EGLAPI EGLBoolean EGLAPIENTRY eglShowScreenSurfaceMESA(EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode);
  55. EGLAPI EGLBoolean EGLAPIENTRY eglScreenPositionMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y);
  56. EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value);
  57. EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenSurfaceMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface);
  58. EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenModeMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode);
  59. EGLAPI const char * EGLAPIENTRY eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode);
  60. #endif /* EGL_EGLEXT_PROTOTYPES */
  61. typedef EGLBoolean (EGLAPIENTRYP PFNEGLCHOOSEMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
  62. typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMODESMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
  63. typedef EGLBoolean (EGLAPIENTRYP PFNEGLGetModeATTRIBMESA) (EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value);
  64. typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSCRREENSMESA) (EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens);
  65. typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESCREENSURFACEMESA) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
  66. typedef EGLBoolean (EGLAPIENTRYP PFNEGLSHOWSCREENSURFACEMESA) (EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode);
  67. typedef EGLBoolean (EGLAPIENTRYP PFNEGLSCREENPOSIITONMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y);
  68. typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value);
  69. typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENSURFACEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface);
  70. typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode);
  71. typedef const char * (EGLAPIENTRYP PFNEGLQUERYMODESTRINGMESA) (EGLDisplay dpy, EGLModeMESA mode);
  72. #endif /* EGL_MESA_screen_surface */
  73. #ifndef EGL_MESA_copy_context
  74. #define EGL_MESA_copy_context 1
  75. #ifdef EGL_EGLEXT_PROTOTYPES
  76. EGLAPI EGLBoolean EGLAPIENTRY eglCopyContextMESA(EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask);
  77. #endif /* EGL_EGLEXT_PROTOTYPES */
  78. typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYCONTEXTMESA) (EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask);
  79. #endif /* EGL_MESA_copy_context */
  80. #ifndef EGL_MESA_drm_display
  81. #define EGL_MESA_drm_display 1
  82. #ifdef EGL_EGLEXT_PROTOTYPES
  83. EGLAPI EGLDisplay EGLAPIENTRY eglGetDRMDisplayMESA(int fd);
  84. #endif /* EGL_EGLEXT_PROTOTYPES */
  85. typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd);
  86. #endif /* EGL_MESA_drm_display */
  87. #ifdef EGL_MESA_drm_image
  88. /* Mesa's extension to EGL_MESA_drm_image... */
  89. #ifndef EGL_DRM_BUFFER_USE_CURSOR_MESA
  90. #define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004
  91. #endif
  92. #endif
  93. #ifndef EGL_WL_bind_wayland_display
  94. #define EGL_WL_bind_wayland_display 1
  95. #define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */
  96. struct wl_display;
  97. #ifdef EGL_EGLEXT_PROTOTYPES
  98. EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
  99. EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
  100. #endif
  101. typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
  102. typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
  103. #endif
  104. #ifndef EGL_NOK_swap_region
  105. #define EGL_NOK_swap_region 1
  106. #ifdef EGL_EGLEXT_PROTOTYPES
  107. EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects);
  108. #endif
  109. typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects);
  110. #endif
  111. #ifndef EGL_NOK_texture_from_pixmap
  112. #define EGL_NOK_texture_from_pixmap 1
  113. #define EGL_Y_INVERTED_NOK 0x307F
  114. #endif /* EGL_NOK_texture_from_pixmap */
  115. #ifndef EGL_ANDROID_image_native_buffer
  116. #define EGL_ANDROID_image_native_buffer 1
  117. #define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */
  118. #endif
  119. #ifdef __cplusplus
  120. }
  121. #endif
  122. #endif