Bug 91020 - Mesa's demo / tools won't compile since EGL changes
Summary: Mesa's demo / tools won't compile since EGL changes
Status: RESOLVED DUPLICATE of bug 91643
Alias: None
Product: Mesa
Classification: Unclassified
Component: Demos (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-18 08:52 UTC by Mike Lothian
Modified: 2015-09-26 13:11 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Build logs (37.67 KB, text/plain)
2015-06-18 08:52 UTC, Mike Lothian
Details
Build log without EGL (5.45 KB, text/plain)
2015-06-18 23:46 UTC, Mike Lothian
Details
Fix build against EGL implementations that don't support the EGL_MESA_screen_surface extension (6.98 KB, patch)
2015-07-14 09:17 UTC, George Diamantopoulos
Details | Splinter Review

Description Mike Lothian 2015-06-18 08:52:32 UTC
Created attachment 116577 [details]
Build logs

Compile fails with EGL_SCREEN_BIT_MESA
Comment 1 Emil Velikov 2015-06-18 17:57:14 UTC
Mesa commit 7a58262e58d removed all the EGL_MESA_screen_surface definitions as it was never implemented (according to it).

Seems like mesa-demos doesn't have the necessary compile guards. Something like the following should fix things

#if EGL_MESA_screen_surface

// code using the extension

#endif

Feel free to wrap up a patch and send it to mesa-dev ML.

Thanks
Emil
Comment 2 Mike Lothian 2015-06-18 23:45:34 UTC
I'm afraid that's beyond me - I've tried compiling without the egl utilities and now get:
Comment 3 Mike Lothian 2015-06-18 23:46:02 UTC
Created attachment 116585 [details]
Build log without EGL
Comment 4 George Diamantopoulos 2015-07-14 09:17:03 UTC
Created attachment 117106 [details] [review]
Fix build against EGL implementations that don't support  the EGL_MESA_screen_surface extension

There is a patch by Frank Binns (posted on mesa-dev) since 2012 on this... It worked for me, so I'm attaching it here
Comment 5 Emil Velikov 2015-07-30 15:15:25 UTC
(In reply to George Diamantopoulos from comment #4)
> Created attachment 117106 [details] [review] [review]
> Fix build against EGL implementations that don't support  the
> EGL_MESA_screen_surface extension
> 
> There is a patch by Frank Binns (posted on mesa-dev) since 2012 on this...
> It worked for me, so I'm attaching it here

While this should work and has been the approach used so far in mesa-demos, I'm having second doubts how wise of an idea it is.

In this particular example, this will result in a "empty" demo/program which won't do anything when run on a EGL_MESA_screen_surface capable driver.

I.e. even if your system is perfectly fine, the binary build by your distro/elsewhere with the missing definition will be useless.

May I suggest that we add the relevant defines, after including the *GL headers. This way the binary will work on compatible systems, and (should) bail out if the extension is not supported.

One could also fix the other similar cases, while at it ;-) Git grep shows some ~120 lines :-P
Comment 6 Marek Olšák 2015-09-26 13:11:50 UTC

*** This bug has been marked as a duplicate of bug 91643 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.