[Piglit] [PATCH] arb_texture_view: fix order of vertices in draw_3d_depth()
Eric Anholt
eric at anholt.net
Thu Dec 14 20:15:08 UTC 2017
Brian Paul <brianp at 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 <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20171214/d814eae1/attachment.sig>
More information about the Piglit
mailing list