[Piglit] [PATCH 02/20] ext_transform_feedback: output better information about which varying has incorrect data

Timothy Arceri t_arceri at yahoo.com.au
Mon Sep 28 18:26:32 PDT 2015


---
 tests/spec/ext_transform_feedback/max-varyings.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tests/spec/ext_transform_feedback/max-varyings.c b/tests/spec/ext_transform_feedback/max-varyings.c
index 1b70ddd..4bad8a6 100644
--- a/tests/spec/ext_transform_feedback/max-varyings.c
+++ b/tests/spec/ext_transform_feedback/max-varyings.c
@@ -241,7 +241,8 @@ coord_from_index(int index)
 }
 
 static GLboolean
-check_xfb_output(int max_varyings, int num_xfb_varyings, int offset)
+check_xfb_output(int max_varyings, int num_xfb_varyings,
+                 int offset, const char **xfb_varyings)
 {
 	GLboolean pass = GL_TRUE;
 	int vertex, varying, i;
@@ -262,8 +263,8 @@ check_xfb_output(int max_varyings, int num_xfb_varyings, int offset)
 				printf("Out of a total of %i\n", max_varyings);
 				printf("With an offset of %i\n", offset);
 				printf("Got incorrect transform feedback data "
-				       "for vertex %i, varying %i\n", vertex,
-				       varying);
+				       "for vertex %i, varying %s\n",
+				       vertex, *(xfb_varyings + offset));
 				printf("Expected (%f, %f, %f, %f)\n",
 				       expected[0], expected[1], expected[2],
 				       expected[3]);
@@ -319,8 +320,8 @@ draw(GLuint vs, GLuint fs, int num_xfb_varyings,
 				 10);
 
 		glEndTransformFeedback();
-		pass = check_xfb_output(max_varyings, num_xfb_varyings, offset)
-			&& pass;
+		pass = check_xfb_output(max_varyings, num_xfb_varyings,
+			  offset, xfb_varyings) && pass;
 
 		glDeleteProgram(prog);
 	}
-- 
2.4.3



More information about the Piglit mailing list