[Mesa-dev] [PATCH 4/5] egl: use unix defines on osx with clang

Emil Velikov emil.l.velikov at gmail.com
Thu Jul 2 05:20:57 PDT 2015


On 19 June 2015 at 12:43, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 19 June 2015 at 00:23, Julien Isorce <julien.isorce at gmail.com> wrote:
>> On 18 June 2015 at 19:33, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>>
>>> On 18 June 2015 at 19:29, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>> Sorry about that. Unintentionally hit send ;-\
>>>
>>> > On 18 June 2015 at 06:53, Julien Isorce <julien.isorce at gmail.com> wrote:
>>> >> CC       egl_dri2.lo
>>> >> include/EGL/eglplatform.h:135:2:
>>> >>   error: "Platform not recognized"
>>> >> include/EGL/eglplatform.h:140:9:
>>> >>   error: unknown type name 'EGLNativeDisplayType'
>>> >> typedef EGLNativeDisplayType NativeDisplayType;
>>> >>
>>> You should not longer see this message. Did you try building things,
>>> with the updated eglplatform.h ?
>>
>>
>> You are right I forgot to update the new error message with current
>> eglplatform.h.
>>
>>>
>>> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90249
>>> >> Signed-off-by: Julien Isorce <j.isorce at samsung.com>
>>> >> ---
>>> >>  include/EGL/eglplatform.h | 4 ++--
>>> >>  1 file changed, 2 insertions(+), 2 deletions(-)
>>> >>
>>> >> diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h
>>> >> index 7802542..b376e64 100644
>>> >> --- a/include/EGL/eglplatform.h
>>> >> +++ b/include/EGL/eglplatform.h
>>> >> @@ -77,7 +77,7 @@ typedef HDC     EGLNativeDisplayType;
>>> >>  typedef HBITMAP EGLNativePixmapType;
>>> >>  typedef HWND    EGLNativeWindowType;
>>> >>
>>> >> -#elif defined(__APPLE__) || defined(__WINSCW__) ||
>>> >> defined(__SYMBIAN32__)  /* Symbian */
>>> >> +#elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */
>>> >>
>>> The above "defined(__APPLE__))" comes from Khronos, so if it's wrong
>>> perhaps it should be reported to them ? Afaict with current mesa this
>>> patch is not needed, and things will just work.
>>
>>
>> I remember that with the latest eglplatform.h I had to manually include
>> #include <X11/Xlib.h> / #include <X11/Xutil.h> where they are used  (because
>> not hitting their inclusion by eglplatform.h)
>> But then build was complaining about converting int to Display*, and void*
>> to Pixmap/Window. A naive cast could silenced the build error but then it
>> was crashing at runtime.
>> I'll have another try.
>>
> So it seems that we need something like MESA_EGL_NO_X11_HEADERS for
> __APPLE__. If anyone has personal experience with
> upstreaming/discussing such changes to Khronos, some input would be
> appreciated :-)
>
> I think that updating the commit message (and of course getting in
> touch with the Khronos guys). With Samsung being a "Promoter member"
> there should be a few people from Samsung that can help sort/speed
> things up.
>
In case ^^ was on the vague side:
Imho we should be safe to apply this, with updated commit message.
Although for changes involving the official headers, we should seek
feedback and try to fix/upstream them.

-Emil


More information about the mesa-dev mailing list