[Piglit] [PATCH] Add missing piglit_get_prim_name() for gles3.
Brian Paul
brianp at vmware.com
Mon Feb 25 12:57:17 PST 2013
On 02/25/2013 12:04 PM, Eric Anholt wrote:
> Fixes piglit build since the shader_runner change to use this
> function.
> ---
> tests/util/piglit-util-gles3-enum.c | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/tests/util/piglit-util-gles3-enum.c b/tests/util/piglit-util-gles3-enum.c
> index 530bd88..8b0fcdc 100644
> --- a/tests/util/piglit-util-gles3-enum.c
> +++ b/tests/util/piglit-util-gles3-enum.c
> @@ -704,3 +704,25 @@ piglit_get_gl_enum_name(GLenum param)
> #undef CASE
> }
>
> +const char *
> +piglit_get_prim_name(GLenum prim)
> +{
> + switch (prim) {
> + case GL_POINTS:
> + return "GL_POINTS";
> + case GL_LINES:
> + return "GL_LINES";
> + case GL_LINE_STRIP:
> + return "GL_LINE_STRIP";
> + case GL_LINE_LOOP:
> + return "GL_LINE_LOOP";
> + case GL_TRIANGLES:
> + return "GL_TRIANGLES";
> + case GL_TRIANGLE_STRIP:
> + return "GL_TRIANGLE_STRIP";
> + case GL_TRIANGLE_FAN:
> + return "GL_TRIANGLE_FAN";
> + default:
> + return "(unrecognized enum)";
> + }
> +}
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the Piglit
mailing list