[Mesa-dev] [PATCH 2/2] egl: update headers

Chia-I Wu olvaffe at gmail.com
Tue Dec 20 00:16:52 PST 2011


On Tue, Dec 20, 2011 at 5:28 AM, Ian Romanick <idr at freedesktop.org> wrote:
> On 12/19/2011 02:05 AM, Chia-I Wu wrote:
>>
>> From: Chia-I Wu<olv at lunarg.com>
>>
>> Update to revision 15052.
>>
>> EGL_MESA_drm_image is now official.  But apparently we have our own
>> extension
>> to it and we need this in eglmesaext.h:
>>
>>   #ifdef EGL_MESA_drm_image
>>   /* Mesa's extension to EGL_MESA_drm_image... */
>>   #ifndef EGL_DRM_BUFFER_USE_CURSOR_MESA
>>   #define EGL_DRM_BUFFER_USE_CURSOR_MESA               0x0004
>>   #endif
>>   #endif
> Where is this actually from?  Is it in the extension?  A layered extension?
>  Outer space? :)  It sounds like we need to propagate and update back to the
> Khronos registry.
Outer space it is :)

I am not sure if this extension (and mesa's own addition) is used
anywhere.  It was added for wayland, which seems to migrate away a
while ago.
>
>> ---
>>  include/EGL/eglext.h      |   65
>> +++++++++++++++++++++++++++++++++++++++++++-
>>  include/EGL/eglmesaext.h  |   23 ++--------------
>>  include/EGL/eglplatform.h |    9 +++++-
>>  3 files changed, 73 insertions(+), 24 deletions(-)
>>
>> diff --git a/include/EGL/eglext.h b/include/EGL/eglext.h
>> index 800a23d..a7ea2ea 100644
>> --- a/include/EGL/eglext.h
>> +++ b/include/EGL/eglext.h
>> @@ -34,8 +34,8 @@ extern "C" {
>>
>>  /* Header file version number */
>>  /* Current version at http://www.khronos.org/registry/egl/ */
>> -/* $Revision: 12124 $ on $Date: 2010-07-27 20:12:35 -0700 (Tue, 27 Jul
>> 2010) $ */
>> -#define EGL_EGLEXT_VERSION 7
>> +/* $Revision: 15052 $ on $Date: 2011-07-06 17:43:46 -0700 (Wed, 06 Jul
>> 2011) $ */
>> +#define EGL_EGLEXT_VERSION 10
>>
>>  #ifndef EGL_KHR_config_attribs
>>  #define EGL_KHR_config_attribs 1
>> @@ -267,6 +267,67 @@ typedef EGLSurface (EGLAPIENTRYP
>> PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dp
>>  #define EGL_COLOR_ARGB_HI                     0x8F73
>>  #endif /* EGL_HI_colorformats */
>>
>> +#ifndef EGL_MESA_drm_image
>> +#define EGL_MESA_drm_image 1
>> +#define EGL_DRM_BUFFER_FORMAT_MESA             0x31D0      /*
>> CreateDRMImageMESA attribute */
>> +#define EGL_DRM_BUFFER_USE_MESA                        0x31D1      /*
>> CreateDRMImageMESA attribute */
>> +#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA      0x31D2      /*
>> EGL_IMAGE_FORMAT_MESA attribute value */
>> +#define EGL_DRM_BUFFER_MESA                    0x31D3      /*
>> eglCreateImageKHR target */
>> +#define EGL_DRM_BUFFER_STRIDE_MESA             0x31D4
>> +#define EGL_DRM_BUFFER_USE_SCANOUT_MESA                0x00000001  /*
>> EGL_DRM_BUFFER_USE_MESA bits */
>> +#define EGL_DRM_BUFFER_USE_SHARE_MESA          0x00000002  /*
>> EGL_DRM_BUFFER_USE_MESA bits */
>> +#ifdef EGL_EGLEXT_PROTOTYPES
>> +EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy,
>> const EGLint *attrib_list);
>> +EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy,
>> EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
>> +#endif /* EGL_EGLEXT_PROTOTYPES */
>> +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC)
>> (EGLDisplay dpy, const EGLint *attrib_list);
>> +typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC)
>> (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint
>> *stride);
>> +#endif
>> +
>> +#ifndef EGL_NV_post_sub_buffer
>> +#define EGL_NV_post_sub_buffer 1
>> +#define EGL_POST_SUB_BUFFER_SUPPORTED_NV       0x30BE
>> +#ifdef EGL_EGLEXT_PROTOTYPES
>> +EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy,
>> EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
>> +#endif /* EGL_EGLEXT_PROTOTYPES */
>> +typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay
>> dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
>> +#endif
>> +
>> +#ifndef EGL_ANGLE_query_surface_pointer
>> +#define EGL_ANGLE_query_surface_pointer 1
>> +#ifdef EGL_EGLEXT_PROTOTYPES
>> +EGLAPI EGLBoolean eglQuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface
>> surface, EGLint attribute, void **value);
>> +#endif
>> +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC)
>> (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
>> +#endif
>> +
>> +#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
>> +#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
>> +#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE  0x3200
>> +#endif
>> +
>> +#ifndef EGL_NV_coverage_sample_resolve
>> +#define EGL_NV_coverage_sample_resolve 1
>> +#define EGL_COVERAGE_SAMPLE_RESOLVE_NV         0x3131
>> +#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132
>> +#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV    0x3133
>> +#endif
>> +
>> +#if KHRONOS_SUPPORT_INT64   /* EGLTimeKHR requires 64-bit uint support */
>> +#ifndef EGL_NV_system_time
>> +#define EGL_NV_system_time 1
>> +
>> +typedef khronos_utime_nanoseconds_t EGLuint64NV;
>> +
>> +#ifdef EGL_EGLEXT_PROTOTYPES
>> +EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void);
>> +EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void);
>> +#endif /* EGL_EGLEXT_PROTOTYPES */
>> +typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC)
>> (void);
>> +typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
>> +#endif
>> +#endif
>> +
>>  #include<EGL/eglmesaext.h>
>>
>>  #ifdef __cplusplus
>> diff --git a/include/EGL/eglmesaext.h b/include/EGL/eglmesaext.h
>> index 1b83778..53576ba 100644
>> --- a/include/EGL/eglmesaext.h
>> +++ b/include/EGL/eglmesaext.h
>> @@ -102,28 +102,11 @@ typedef EGLDisplay (EGLAPIENTRYP
>> PFNEGLGETDRMDISPLAYMESA) (int fd);
>>
>>  #endif /* EGL_MESA_drm_display */
>>
>> -#ifndef EGL_MESA_drm_image
>> -#define EGL_MESA_drm_image 1
>> -#define EGL_DRM_BUFFER_FORMAT_MESA             0x31D0  /*
>> eglCreateImageKHR attribute */
>> -#define EGL_DRM_BUFFER_USE_MESA                        0x31D1
>> -
>> -/* EGL_DRM_BUFFER_FORMAT_MESA tokens */
>> -#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA      0x31D2
>> -
>> -/* EGL_DRM_BUFFER_USE_MESA bits */
>> -#define EGL_DRM_BUFFER_USE_SCANOUT_MESA                0x0001
>> -#define EGL_DRM_BUFFER_USE_SHARE_MESA          0x0002
>> +#ifdef EGL_MESA_drm_image
>> +/* Mesa's extension to EGL_MESA_drm_image... */
>> +#ifndef EGL_DRM_BUFFER_USE_CURSOR_MESA
>>  #define EGL_DRM_BUFFER_USE_CURSOR_MESA                0x0004
>> -
>> -#define EGL_DRM_BUFFER_MESA                    0x31D3  /*
>> eglCreateImageKHR target */
>> -#define EGL_DRM_BUFFER_STRIDE_MESA             0x31D4  /*
>> eglCreateImageKHR attribute */
>> -
>> -#ifdef EGL_EGLEXT_PROTOTYPES
>> -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA(EGLDisplay dpy,
>> const EGLint *attrib_list);
>> -EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA(EGLDisplay dpy,
>> EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
>>  #endif
>> -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESA) (EGLDisplay
>> dpy, const EGLint *attrib_list);
>> -typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESA) (EGLDisplay
>> dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
>>  #endif
>>
>>  #ifndef EGL_WL_bind_wayland_display
>> diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h
>> index 8d3f72f..17fdc61 100644
>> --- a/include/EGL/eglplatform.h
>> +++ b/include/EGL/eglplatform.h
>> @@ -25,7 +25,7 @@
>>  */
>>
>>  /* Platform-specific types and definitions for egl.h
>> - * $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec
>> 2009) $
>> + * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug
>> 2010) $
>>   *
>>   * Adopters may modify khrplatform.h and this file to suit their
>> platform.
>>   * You are encouraged to submit all modifications to the Khronos group so
>> that
>> @@ -60,6 +60,11 @@
>>   * Windows Device Context. They must be defined in platform-specific
>>   * code below. The EGL-prefixed versions of Native*Type are the same
>>   * types, renamed in EGL 1.3 so all types in the API start with "EGL".
>> + *
>> + * Khronos STRONGLY RECOMMENDS that you use the default definitions
>> + * provided below, since these changes affect both binary and source
>> + * portability of applications using EGL running on different EGL
>> + * implementations.
>>   */
>>
>>  #if defined(_WIN32) || defined(__VC32__)&&  !defined(__CYGWIN__)&&
>>  !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
>>
>> @@ -99,7 +104,7 @@ typedef struct ANativeWindow
>>  *EGLNativeWindowType;
>>  typedef struct egl_native_pixmap_t  *EGLNativePixmapType;
>>  typedef void                        *EGLNativeDisplayType;
>>
>> -#elif defined(__unix__) || defined(__unix)
>> +#elif defined(__unix__)
>>
>>  #ifdef MESA_EGL_NO_X11_HEADERS
>>
>



-- 
olv at LunarG.com


More information about the mesa-dev mailing list