[Piglit] [PATCH 1/3] piglit-util-gl: Add piglit_get_gl_enum_from_name

Jordan Justen jordan.l.justen at intel.com
Wed Feb 18 15:20:52 PST 2015


On 2015-02-18 14:32:29, Jordan Justen wrote:
> diff --git a/tests/util/piglit-util-gl.h b/tests/util/piglit-util-gl.h
> index 0f8eb81..fa4a6e4 100644
> --- a/tests/util/piglit-util-gl.h
> +++ b/tests/util/piglit-util-gl.h
> @@ -87,6 +87,15 @@ const char* piglit_get_gl_error_name(GLenum error);
>  const char *piglit_get_gl_enum_name(GLenum param);
>  
>  /**
> + * \brief Convert a string to a GL enum.
> + *
> + * For example, given "GL_INVALID_ENUM", return GL_INVALID_ENUM.
> + *
> + * abort() if the string is not recognized.

Any suggestions for a better action if the string is not recognized?

I just saw that Emil had the same question. :)

-Jordan

> + */
> +GLenum piglit_get_gl_enum_from_name(const char *name);
> +
> +/**
>   * \brief Convert a GL primitive type enum value to a string.
>   *
>   * For example, given GL_POLYGON, return "GL_POLYGON".
> -- 
> 2.1.4
> 


More information about the Piglit mailing list