[Mesa-dev] [PATCH 1/3] egl: add EGL_NV_post_sub_buffer

Ian Romanick idr at freedesktop.org
Fri Dec 16 14:26:20 PST 2011


On 12/14/2011 01:21 PM, Ian Romanick wrote:
> On 12/14/2011 12:24 PM, Fredrik Höglund wrote:
>>
>> diff --git a/include/EGL/eglext.h b/include/EGL/eglext.h
>> index 9484b83..d03a24d 100644
>> --- a/include/EGL/eglext.h
>> +++ b/include/EGL/eglext.h
>> @@ -144,6 +144,15 @@ typedef EGLImageKHR (EGLAPIENTRYP
>> PFNEGLCREATEDRMIMAGEMESA) (EGLDisplay dpy, con
>> typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESA) (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_WL_bind_wayland_display
>> #define EGL_WL_bind_wayland_display 1
>
> I think we may be treating this file incorrectly. It's my understanding
> that eglext.h comes from Khronos, and we don't get to modify it. Our
> current eglext.h is based on version 7 (current version is 10), and it
> has diverged quite a bit. I want to ping folks at Khronos and figure out
> how we're supposed to deal with this file.

After some discussion with the EGL group in Khronos, here is what I have 
learned.

- Specific implementations are allowed to modify eglext.h, but it's not 
really recommended.

- Instead, implementations are recommended to ship, and I'm not kidding, 
eglMYPLATFORMext.h, where MYPLATFORM is some name like mesa or android, 
or whatever.

- One suggestion is to have a eglMYPLATFORMext.h and have eglext.h 
include that.

I think I'm in favor of the later option.  This isolates our changes to 
a separate file, and it prevents applications from having to directly 
include eglmesaext.h (or whatever).  This also allows us to get new 
versions of the official eglext.h with less risk of dropping something.

I also think that any and all Mesa and Wayland extensions should get 
propagated to the official eglext.h as soon as possible.  It looks like 
a few of them (e.g., EGL_MESA_drm_image) already are.


More information about the mesa-dev mailing list