[Piglit] [PATCH 7/7] util: Print all image errors

Topi Pohjolainen topi.pohjolainen at intel.com
Tue Mar 1 10:13:28 UTC 2016


For example, on SKL with:
texsubimage pbo manual GL_TEXTURE_2D GL_RGB8 6 10 0 94 53 0 -auto -fbo

one now gets:

6,10,0: test = 40,12,0,255 ref = 12,0,40,255 (comparing 8 bits)
7,10,0: test = 40,14,0,255 ref = 14,0,40,255 (comparing 8 bits)
6,11,0: test = 44,12,0,255 ref = 12,0,44,255 (comparing 8 bits)
7,11,0: test = 44,14,0,255 ref = 14,0,44,255 (comparing 8 bits)
6,12,0: test = 48,12,0,255 ref = 12,0,48,255 (comparing 8 bits)
7,12,0: test = 48,14,0,255 ref = 14,0,48,255 (comparing 8 bits)
6,13,0: test = 52,12,0,255 ref = 12,0,52,255 (comparing 8 bits)
7,13,0: test = 52,14,0,255 ref = 14,0,52,255 (comparing 8 bits)
6,14,0: test = 56,12,0,255 ref = 12,0,56,255 (comparing 8 bits)
7,14,0: test = 56,14,0,255 ref = 14,0,56,255 (comparing 8 bits)
6,15,0: test = 60,12,0,255 ref = 12,0,60,255 (comparing 8 bits)
7,15,0: test = 60,14,0,255 ref = 14,0,60,255 (comparing 8 bits)
6,16,0: test = 64,12,0,255 ref = 12,0,64,255 (comparing 8 bits)
7,16,0: test = 64,14,0,255 ref = 14,0,64,255 (comparing 8 bits)
6,17,0: test = 68,12,0,255 ref = 12,0,68,255 (comparing 8 bits)
7,17,0: test = 68,14,0,255 ref = 14,0,68,255 (comparing 8 bits)
6,18,0: test = 72,12,0,255 ref = 12,0,72,255 (comparing 8 bits)
7,18,0: test = 72,14,0,255 ref = 14,0,72,255 (comparing 8 bits)
6,19,0: test = 76,12,0,255 ref = 12,0,76,255 (comparing 8 bits)
7,19,0: test = 76,14,0,255 ref = 14,0,76,255 (comparing 8 bits)
6,20,0: test = 80,12,0,255 ref = 12,0,80,255 (comparing 8 bits)
7,20,0: test = 80,14,0,255 ref = 14,0,80,255 (comparing 8 bits)
6,21,0: test = 84,12,0,255 ref = 12,0,84,255 (comparing 8 bits)
7,21,0: test = 84,14,0,255 ref = 14,0,84,255 (comparing 8 bits)
6,22,0: test = 88,12,0,255 ref = 12,0,88,255 (comparing 8 bits)
7,22,0: test = 88,14,0,255 ref = 14,0,88,255 (comparing 8 bits)
6,23,0: test = 92,12,0,255 ref = 12,0,92,255 (comparing 8 bits)
7,23,0: test = 92,14,0,255 ref = 14,0,92,255 (comparing 8 bits)
6,24,0: test = 96,12,0,255 ref = 12,0,96,255 (comparing 8 bits)
7,24,0: test = 96,14,0,255 ref = 14,0,96,255 (comparing 8 bits)
6,25,0: test = 100,12,0,255 ref = 12,0,100,255 (comparing 8 bits)
7,25,0: test = 100,14,0,255 ref = 14,0,100,255 (comparing 8 bits)
6,26,0: test = 104,12,0,255 ref = 12,0,104,255 (comparing 8 bits)
7,26,0: test = 104,14,0,255 ref = 14,0,104,255 (comparing 8 bits)
6,27,0: test = 108,12,0,255 ref = 12,0,108,255 (comparing 8 bits)
7,27,0: test = 108,14,0,255 ref = 14,0,108,255 (comparing 8 bits)

instead of just first:

6,10,0: test = 40,12,0,255 ref = 12,0,40,255 (comparing 8 bits)

This was informative for me as I could see that I had a problem
with region 6,10 7,27.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 tests/util/piglit-util-gl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index d636810..a3f1257 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -1588,6 +1588,7 @@ piglit_equal_images_update_rgba8(const GLubyte *expected_original,
 				 unsigned uw, unsigned uh, unsigned ud,
 				 unsigned bits)
 {
+	bool pass = true;
 	assert(bits > 0 && bits <= 8);
 
 	unsigned x, y, z;
@@ -1619,7 +1620,7 @@ piglit_equal_images_update_rgba8(const GLubyte *expected_original,
 						observed[2], observed[3],
 						ref[0], ref[1], ref[2], ref[3],
 						bits);
-					return 0;
+					pass = false;
 				}
 
 				observed += 4;
@@ -1629,7 +1630,7 @@ piglit_equal_images_update_rgba8(const GLubyte *expected_original,
 		}
 	}
 
-	return 1;
+	return pass;
 }
 
 /**
-- 
2.5.0



More information about the Piglit mailing list