[Piglit] [PATCH v2 1/2] shader_runner: Add support for "polygon mode"

Lyude Paul lyude at redhat.com
Thu Mar 30 21:49:57 UTC 2017


ignore the second revision of this one for now, realized I did changes
on all the patches but this one by accident. will respin in a little
bit.

On Thu, 2017-03-30 at 17:38 -0400, Lyude wrote:
> This adds support for the "polygon mode" command in shader_runner,
> which
> allows us to change the current GL_POLYGON_MODE at runtime for
> drawing
> the front and/or back of prims using glPolygonMode().
> 
> Signed-off-by: Lyude <lyude at redhat.com>
> ---
>  tests/shaders/shader_runner.c | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/shaders/shader_runner.c
> b/tests/shaders/shader_runner.c
> index b487e8a..c57e457 100644
> --- a/tests/shaders/shader_runner.c
> +++ b/tests/shaders/shader_runner.c
> @@ -3335,7 +3335,21 @@ piglit_display(void)
>  							expected))
>  				result = PIGLIT_FAIL;
>  
> -		} else if (parse_str(line, "probe all rgba ",
> &rest)) {
> +		} else if (parse_str(rest, "polygon mode ", &rest))
> {
> +                        GLenum face, mode;
> +
> +                        REQUIRE(parse_enum_gl(rest, &face, &rest) &&
> +                                parse_enum_gl(rest, &mode, &rest),
> +                                "Polygon mode command not understood
> at %s\n",
> +                                rest);
> +
> +                        glPolygonMode(face, mode);
> +
> +                        if (!piglit_check_gl_error(GL_NO_ERROR)) {
> +                                fprintf(stderr, "glPolygonMode
> error\n");
> +                                piglit_report_result(PIGLIT_FAIL);
> +                        }
> +                } else if (parse_str(line, "probe all rgba ",
> &rest)) {
>  			parse_floats(rest, c, 4, NULL);
>  			if (result != PIGLIT_FAIL &&
>  			    !piglit_probe_rect_rgba(0, 0,
> read_width,


More information about the Piglit mailing list