[Piglit] [PATCH 4/4] sampler-cube-shadow: Use glDrawArrays instead of piglit_draw_rect.

Eric Anholt eric at anholt.net
Fri Jun 21 14:21:19 PDT 2013


Fabian Bieler <fabianbieler at fastmail.fm> writes:

> Don't mix piglit_draw_rect and additional attribute arrays.
>
> Also don't immediately quit test if not running automatically.
> ---
>  tests/texturing/sampler-cube-shadow.c | 80 +++++++++++++++++++++++------------
>  1 file changed, 52 insertions(+), 28 deletions(-)
>
> diff --git a/tests/texturing/sampler-cube-shadow.c b/tests/texturing/sampler-cube-shadow.c
> index a4b1f97..d875bfb 100644
> --- a/tests/texturing/sampler-cube-shadow.c
> +++ b/tests/texturing/sampler-cube-shadow.c
> @@ -49,56 +49,86 @@ static GLint prog;
>  static GLint fs;
>  static GLint vs;
>  
> -/* These texture coordinates should have 1 or -1 in the major axis
> +static const GLint stride = 8 * sizeof(GLfloat);
> +/* These are interlaced vertex coordiantes and texture coordinates.

                                  coordinates

> + * The vertex coordinates specify 6 quads set in a 3x2 grid with some space
> + * inbetween.

      in between

> @@ -289,7 +313,7 @@ piglit_display(void)
>  	pass = pass && piglit_probe_rect_rgba(250, 200, 50, 50, white);
>  
>  	pass = piglit_check_gl_error(GL_NO_ERROR) && pass;
> -	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
> -	piglit_present_results();
> +	if (!piglit_automatic)
> +		piglit_present_results();
>  	return pass ? PIGLIT_PASS : PIGLIT_FAIL;

No need to bury piglit_present_results() under an auto check -- it's
skipped in the auto case anyway.  It's great to actually show the
results, though.

With those little things fixed, this is:

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130621/508a4ac1/attachment.pgp>


More information about the Piglit mailing list