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

Message ID 1443489992-26586-2-git-send-email-t_arceri@yahoo.com.au
State New
Headers show

Commit Message

'Timothy Arceri' via Patchwork Forward Sept. 29, 2015, 1:26 a.m.
---
 tests/spec/ext_transform_feedback/max-varyings.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

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);
 	}