[Piglit] [PATCH] arb_texture_view: fix order of vertices in draw_3d_depth()

Brian Paul brianp at vmware.com
Wed Dec 13 15:46:35 UTC 2017


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};
 
 	piglit_draw_rect_from_arrays(vertices, texcoords, false, 1);
 }
-- 
1.9.1



More information about the Piglit mailing list