[Mesa-dev] [PATCH v3] mesa: Update _mesa_has_geometry_shaders

Matt Turner mattst88 at gmail.com
Tue Dec 1 10:04:30 PST 2015


On Tue, Dec 1, 2015 at 7:49 AM, Marta Lofstedt
<marta.lofstedt at linux.intel.com> wrote:
> From: Marta Lofstedt <marta.lofstedt at intel.com>
>
> Updates the _mesa_has_geometry_shaders function to also look
> for OpenGL ES 3.1 contexts that has OES_geometry_shader enabled.
> ---
>  src/mesa/main/context.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
> index 8b64f45..25ef686 100644
> --- a/src/mesa/main/context.h
> +++ b/src/mesa/main/context.h
> @@ -330,7 +330,8 @@ _mesa_is_gles31(const struct gl_context *ctx)
>  static inline bool
>  _mesa_has_geometry_shaders(const struct gl_context *ctx)
>  {
> -   return _mesa_is_desktop_gl(ctx) && ctx->Version >= 32;
> +   return (_mesa_has_OES_geometry_shader(ctx)) ||
> +      (_mesa_is_desktop_gl(ctx) && ctx->Version >= 32);

Please vertically align the second line with the expression in the
first (and remove the superfluous parentheses on the first line):

   return _mesa_has_OES_geometry_shader(ctx) ||
          (_mesa_is_desktop_gl(ctx) && ctx->Version >= 32);


More information about the mesa-dev mailing list