[Mesa-dev] [PATCH] include/GL: fix the interop header for a --disable-glx build
Emil Velikov
emil.l.velikov at gmail.com
Thu Apr 21 14:08:47 UTC 2016
On 20 April 2016 at 16:52, Mircea Gherzan <mircea.gherzan at intel.com> wrote:
> This header should not blindly include the GLX and should also
> conditionally define functions that use GLX parameters. The
> MESA_EGL_NO_X11_HEADERS macro is used to check if we're building without
> GLX support.
>
Eek, I new this will come to bite. Although let's try another approach.
> Signed-off-by: Mircea Gherzan <mircea.gherzan at intel.com>
> ---
> include/GL/mesa_glinterop.h | 37 ++++++++++++++++++++-----------------
> 1 file changed, 20 insertions(+), 17 deletions(-)
>
> diff --git a/include/GL/mesa_glinterop.h b/include/GL/mesa_glinterop.h
> index 814064d..cd3151f 100644
> --- a/include/GL/mesa_glinterop.h
> +++ b/include/GL/mesa_glinterop.h
> @@ -50,7 +50,12 @@
> #ifndef MESA_GLINTEROP_H
> #define MESA_GLINTEROP_H
>
> +#ifdef MESA_EGL_NO_X11_HEADERS
> +#include <GL/gl.h>
> +#else
> #include <GL/glx.h>
> +#endif
> +
> #include <EGL/egl.h>
>
Drop the includes altogether, and forward declare the needed symbols.
Marek, that would require updating the closed source side of things.
Although considering there hasn't been a mesa release that includes
the interface I'd vote for that.
Does this sound OK or I'm missing something ?
Regards
Emil
More information about the mesa-dev
mailing list