[Mesa-dev] [PATCH 1/4] glx/test: fix building for osx

Emil Velikov emil.l.velikov at gmail.com
Fri Feb 2 12:20:38 UTC 2018


On 1 February 2018 at 17:48, Jon Turney <jon.turney at dronecode.org.uk> wrote:
> An additional stub for applegl_create_context() is needed
> Cannot test indirect API as it's not built on osx, currently
>
> Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
> ---
>  src/glx/tests/fake_glx_screen.cpp | 11 +++++++++++
>  src/glx/tests/indirect_api.cpp    |  4 ++++
>  2 files changed, 15 insertions(+)
>
> diff --git a/src/glx/tests/fake_glx_screen.cpp b/src/glx/tests/fake_glx_screen.cpp
> index 801f54a6fa..71e4e8ce48 100644
> --- a/src/glx/tests/fake_glx_screen.cpp
> +++ b/src/glx/tests/fake_glx_screen.cpp
> @@ -75,6 +75,17 @@ indirect_create_context_attribs(struct glx_screen *base,
>     return indirect_create_context(base, config_base, shareList, 0);
>  }
>
> +#ifdef GLX_USE_APPLEGL
> +extern "C" struct glx_context *
> +applegl_create_context(struct glx_screen *base,
> +                      struct glx_config *config_base,
> +                      struct glx_context *shareList,
> +                      int renderType)
> +{
> +   return indirect_create_context(base, config_base, shareList, renderType);
> +}
> +#endif
> +
>  /* This is necessary so that we don't have to link with glxcurrent.c
>   * which would require us to link with X libraries and what not.
>   */
> diff --git a/src/glx/tests/indirect_api.cpp b/src/glx/tests/indirect_api.cpp
> index 34304a185e..b9a4ca0655 100644
> --- a/src/glx/tests/indirect_api.cpp
> +++ b/src/glx/tests/indirect_api.cpp
> @@ -705,6 +705,8 @@ void __indirect_glFramebufferTextureLayer(void) { }
>  }
>  /*@}*/
>
> +#ifndef GLX_USE_APPLEGL
> +
I'd tweak this like below. It gives a nice warning, so people don't forget ;-)
Regardless, the series is
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

#ifdef GLX_USE_APPLEGL
#warning Indirect GLX tests are not build
#else

-Emil


More information about the mesa-dev mailing list