On Thu, Apr 24, 2014 at 04:32:08PM -0700, Sarah Sharp wrote: > In order to support the (currently unregistered) Chromium-specific EGL > extension eglGetSyncValuesCHROMIUM on Intel systems, we need to import > the Chromium header that defines it. The file was downloaded from > > https://chromium.googlesource.com/chromium/chromium/+/trunk/ui/gl/EGL/eglextchromium.h > > It is subject to the license found at > > https://chromium.googlesource.com/chromium/chromium/+/trunk/LICENSE > > I have imported the header file and added the license text to the top. > The only change was to remove the Chromium specific defines for > GPU_EGL_EGLEXTCHROMIUM_H_ If I leave them in, compiling Mesa fails: > > make[2]: Entering directory `/home/sarah/git/mesa/src/egl/drivers/dri2' > CC egl_dri2.lo > In file included from ../../../../include/EGL/eglext.h:649:0, > from ../../../../src/egl/main/egltypedefs.h:37, > from ../../../../src/egl/main/eglconfig.h:37, > from egl_dri2.h:67, > from egl_dri2.c:52: > ../../../../include/EGL/eglextchromium.h:60:38: error: no macro name given in > #define directive > #define // GPU_EGL_EGLEXTCHROMIUM_H_ > ^ > ../../../../include/EGL/eglextchromium.h:31:0: error: unterminated #ifndef > #ifndef GPU_EGL_EGLEXTCHROMIUM_H_ > ^ > make[2]: *** [egl_dri2.lo] Error 1 > make[2]: Leaving directory `/home/sarah/git/mesa/src/egl/drivers/dri2' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/sarah/git/mesa/src' > make: *** [all-recursive] Error 1
I took a closer look at Google's header, and yeah, it's totally broken. Looks like a partial copy-paste error to me. The Mesa header still needs an include guard even if upstream's header is broken. I replaced the trailing problematic #define with #endif // GPU_EGL_EGLEXTCHROMIUM_H_ and that worked for me. Do that and this patch is Reviewed-by: Chad Versace <chad.vers...@linux.intel.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev