[Mesa-dev] [PATCH 03/14] mesa: add _mesa_is_no_error_enabled() helper

Brian Paul brianp at vmware.com
Thu Apr 13 02:54:42 UTC 2017


On 04/12/2017 05:42 PM, Timothy Arceri wrote:
> ---
>   src/mesa/main/context.h | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
> index 9704a96..ccb5463 100644
> --- a/src/mesa/main/context.h
> +++ b/src/mesa/main/context.h
> @@ -317,20 +317,27 @@ _mesa_is_gles31(const struct gl_context *ctx)
>   /**
>    * Checks if the context is for GLES 3.2 or later
>    */
>   static inline bool
>   _mesa_is_gles32(const struct gl_context *ctx)
>   {
>      return ctx->API == API_OPENGLES2 && ctx->Version >= 32;
>   }
>
>
> +static inline bool
> +_mesa_is_no_error_enabled(const struct gl_context *ctx)

That function name doesn't exactly roll off the tongue.  I realize it 
comes from KHR "no_error" but I think something like 
_mesa_no_error_check() would be easier to parse.

I have a few other quick comments on some of the other patches, but I 
don't have time for a detailed review right now.

-Brian

> +{
> +   return ctx->Const.ContextFlags & GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR;
> +}
> +
> +
>   /**
>    * Checks if the context supports geometry shaders.
>    */
>   static inline bool
>   _mesa_has_geometry_shaders(const struct gl_context *ctx)
>   {
>      return _mesa_has_OES_geometry_shader(ctx) ||
>             (_mesa_is_desktop_gl(ctx) && ctx->Version >= 32);
>   }
>
>



More information about the mesa-dev mailing list