[Mesa-dev] [PATCH 04/15] egl: import headers from Khronos EGL registry

Daniel Stone daniel at fooishbar.org
Fri May 15 03:20:39 PDT 2015


Hi,

On 14 May 2015 at 23:33, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> Hi Marek,
> On 12/05/15 22:54, Marek Olšák wrote:
>> -#elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */
>> +#elif defined(__APPLE__) || defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */
>>
>>  typedef int   EGLNativeDisplayType;
>>  typedef void *EGLNativeWindowType;
>>  typedef void *EGLNativePixmapType;
>>
>> -#elif defined(WL_EGL_PLATFORM)
>> +#elif defined(__ANDROID__) || defined(ANDROID)
>>
>> -typedef struct wl_display     *EGLNativeDisplayType;
>> -typedef struct wl_egl_pixmap  *EGLNativePixmapType;
>> -typedef struct wl_egl_window  *EGLNativeWindowType;
>> +#include <android/native_window.h>
>>
>> -#elif defined(__GBM__)
>> -
>> -typedef struct gbm_device  *EGLNativeDisplayType;
>> -typedef struct gbm_bo      *EGLNativePixmapType;
>> -typedef void               *EGLNativeWindowType;
>> -
>> -#elif defined(ANDROID) /* Android */
>> -
>> -struct ANativeWindow;
>>  struct egl_native_pixmap_t;
>>
>> -typedef struct ANativeWindow        *EGLNativeWindowType;
>> -typedef struct egl_native_pixmap_t  *EGLNativePixmapType;
>> -typedef void                        *EGLNativeDisplayType;
>> +typedef struct ANativeWindow*           EGLNativeWindowType;
>> +typedef struct egl_native_pixmap_t*     EGLNativePixmapType;
>> +typedef void*                           EGLNativeDisplayType;
>>
>>  #elif defined(__unix__)
>>
>> -#if defined(MESA_EGL_NO_X11_HEADERS)
>> -
>> -typedef void            *EGLNativeDisplayType;
>> -typedef khronos_uintptr_t EGLNativePixmapType;
>> -typedef khronos_uintptr_t EGLNativeWindowType;
>> -
>> -#else
>> -
>>  /* X11 (tentative)  */
>>  #include <X11/Xlib.h>
>>  #include <X11/Xutil.h>
>> @@ -122,18 +103,8 @@ typedef Display *EGLNativeDisplayType;
>>  typedef Pixmap   EGLNativePixmapType;
>>  typedef Window   EGLNativeWindowType;
>>
>> -#endif /* MESA_EGL_NO_X11_HEADERS */
>> -
>> -#elif __HAIKU__
>> -#include <kernel/image.h>
>> -typedef void                         *EGLNativeDisplayType;
>> -typedef khronos_uintptr_t     EGLNativePixmapType;
>> -typedef khronos_uintptr_t     EGLNativeWindowType;
>> -
> Upon closer look, one could get away with the above changes, although
> there may be something more subtle to it.
>
> Kristian, Chad,
>
> Would you have any suggestions for/against nuking the Wayland/GBM/other
> typedefs ? With an extra eye on the Haiku changes, what would it take to
> get the current eglplatform.h (or equivalent) accepted with Khronos ?

No objection from me; I don't know of anyone using Wayland/GBM.
Android might (will) be harder to get away with though. Luckily for
us, platform_base should hopefully prevent people from ever trying
silly Native{Display,Window}Type hacks on Wayland/GBM.

Cheers,
Daniel


More information about the mesa-dev mailing list