Brian Paul <bri...@vmware.com> writes:

> The vertices are drawn with a GL_TRIANGLE_STRIP.  As it was, the
> order of the 3rd and 4th vertices caused us to render a "twisted"
> quad.  With this change, a true quad is drawn.
>
> llvmpipe passes as it did before.  NVIDIA's driver still fails the test.
> ---
>  tests/spec/arb_texture_view/common.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tests/spec/arb_texture_view/common.c 
> b/tests/spec/arb_texture_view/common.c
> index fc18bbc..f2453f5 100644
> --- a/tests/spec/arb_texture_view/common.c
> +++ b/tests/spec/arb_texture_view/common.c
> @@ -105,13 +105,13 @@ void
>  draw_3d_depth(float x, float y, float w, float h, int depth)
>  {
>       const GLfloat vertices[16] =  {x, y, depth, 0.0,
> -                              x+w, y, depth, 0.0,
> -                              x+w, y+h, depth, 0.0,
> -                              x, y+h, depth, 0.0};
> +                                    x+w, y, depth, 0.0,
> +                                    x, y+h, depth, 0.0,
> +                                    x+w, y+h, depth, 0.0};
>       const GLfloat texcoords[8] = {0.0, 0.0,
> -                              1.0, 0.0,
> -                              1.0, 1.0,
> -                              0.0, 1.0};
> +                                   1.0, 0.0,
> +                                   0.0, 1.0,
> +                                   1.0, 1.0};

This matches the ordering that other callers of
piglit_draw_rect_from_arrays() use.

Reviewed-by: Eric Anholt <e...@anholt.net>


Attachment: signature.asc
Description: PGP signature

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to