[Piglit] [PATCH 1/5] Always print what is being probed

Marek Olšák maraeo at gmail.com
Sat Jun 1 05:38:38 PDT 2013


---
 tests/fbo/fbo-pbo-readpixels-small.c     |    2 +-
 tests/general/hiz.c                      |    2 +-
 tests/general/pbo-read-argb8888.c        |    2 +-
 tests/general/pbo-readpixels-small.c     |    2 +-
 tests/texturing/tex-miplevel-selection.c |    2 +-
 tests/util/piglit-util-gl-common.c       |    2 +-
 tests/util/piglit-util-gl.c              |   24 ++++++++++++------------
 tests/util/piglit-util-gles.c            |    8 ++++----
 8 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/tests/fbo/fbo-pbo-readpixels-small.c b/tests/fbo/fbo-pbo-readpixels-small.c
index a565416..8c0ebb0 100644
--- a/tests/fbo/fbo-pbo-readpixels-small.c
+++ b/tests/fbo/fbo-pbo-readpixels-small.c
@@ -82,7 +82,7 @@ static GLboolean
 probe(int x, int y, uint32_t expected, uint32_t observed)
 {
 	if ((expected & 0xffffff) != (observed & 0xffffff)) {
-		printf("Probe at (%i,%i)\n", x, y);
+		printf("Probe color at (%i,%i)\n", x, y);
 		printf("  Expected: 0x%08x\n", expected);
 		printf("  Observed: 0x%08x\n", observed);
 
diff --git a/tests/general/hiz.c b/tests/general/hiz.c
index c053dbd..a642256 100644
--- a/tests/general/hiz.c
+++ b/tests/general/hiz.c
@@ -121,7 +121,7 @@ GLboolean pix_equal(int x, int y, const float probe[3], const float expected[3])
 	}
 
 	if (!ret) {
-		printf("Probe at (%i,%i)\n", x, y);
+		printf("Probe color at (%i,%i)\n", x, y);
 		printf("  Expected: %f %f %f\n", expected[0], expected[1], expected[2]);
 		printf("  Observed: %f %f %f\n", probe[0], probe[1], probe[2]);
 	}
diff --git a/tests/general/pbo-read-argb8888.c b/tests/general/pbo-read-argb8888.c
index d9d4330..123b05f 100644
--- a/tests/general/pbo-read-argb8888.c
+++ b/tests/general/pbo-read-argb8888.c
@@ -46,7 +46,7 @@ static GLboolean
 probe(int x, int y, uint32_t expected, uint32_t observed)
 {
 	if ((expected & 0xffffff) != (observed & 0xffffff)) {
-		printf("Probe at (%i,%i)\n", x, y);
+		printf("Probe color at (%i,%i)\n", x, y);
 		printf("  Expected: 0x%08x\n", expected);
 		printf("  Observed: 0x%08x\n", observed);
 
diff --git a/tests/general/pbo-readpixels-small.c b/tests/general/pbo-readpixels-small.c
index 84f88af..026531b 100644
--- a/tests/general/pbo-readpixels-small.c
+++ b/tests/general/pbo-readpixels-small.c
@@ -52,7 +52,7 @@ static GLboolean
 probe(int x, int y, uint32_t expected, uint32_t observed)
 {
 	if ((expected & 0xffffff) != (observed & 0xffffff)) {
-		printf("Probe at (%i,%i)\n", x, y);
+		printf("Probe color at (%i,%i)\n", x, y);
 		printf("  Expected: 0x%08x\n", expected);
 		printf("  Observed: 0x%08x\n", observed);
 
diff --git a/tests/texturing/tex-miplevel-selection.c b/tests/texturing/tex-miplevel-selection.c
index f3b7f5b..571bbc3 100644
--- a/tests/texturing/tex-miplevel-selection.c
+++ b/tests/texturing/tex-miplevel-selection.c
@@ -308,7 +308,7 @@ piglit_display(void)
 										if (fabs(colors[expected_level][c] - (p[c]/255.0)) > 0.01) {
 											failed++;
 
-											printf("Probe at (%i,%i)\n", x, y);
+											printf("Probe color at (%i,%i)\n", x, y);
 											printf("  Expected: %f %f %f\n", colors[expected_level][0],
 											       colors[expected_level][1], colors[expected_level][2]);
 											printf("  Observed: %f %f %f\n", p[0]/255.0, p[1]/255.0, p[2]/255.0);
diff --git a/tests/util/piglit-util-gl-common.c b/tests/util/piglit-util-gl-common.c
index d1b7d5e..82ae820 100644
--- a/tests/util/piglit-util-gl-common.c
+++ b/tests/util/piglit-util-gl-common.c
@@ -421,7 +421,7 @@ piglit_probe_rect_halves_equal_rgba(int x, int y, int w, int h)
 
 			for (p = 0; p < 4; ++p) {
 				if (fabs(probe1[p] - probe2[p]) >= piglit_tolerance[p]) {
-					printf("Probe at (%i,%i)\n", x+i, x+j);
+					printf("Probe color at (%i,%i)\n", x+i, x+j);
 					printf("  Left: %f %f %f %f\n",
 					       probe1[0], probe1[1], probe1[2], probe1[3]);
 					printf("  Right: %f %f %f %f\n",
diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index 0a56582..9e43755 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -88,7 +88,7 @@ int piglit_probe_pixel_rgba(int x, int y, const float* expected)
 	if (pass)
 		return 1;
 
-	printf("Probe at (%i,%i)\n", x, y);
+	printf("Probe color at (%i,%i)\n", x, y);
 	printf("  Expected: %f %f %f %f\n", expected[0], expected[1], expected[2], expected[3]);
 	printf("  Observed: %f %f %f %f\n", probe[0], probe[1], probe[2], probe[3]);
 
@@ -150,7 +150,7 @@ piglit_probe_rect_rgba(int x, int y, int w, int h, const float *expected)
 
 			for (p = 0; p < 4; ++p) {
 				if (fabs(probe[p] - expected[p]) >= piglit_tolerance[p]) {
-					printf("Probe at (%i,%i)\n", x+i, y+j);
+					printf("Probe color at (%i,%i)\n", x+i, y+j);
 					printf("  Expected: %f %f %f %f\n",
 					       expected[0], expected[1], expected[2], expected[3]);
 					printf("  Observed: %f %f %f %f\n",
@@ -182,7 +182,7 @@ piglit_probe_rect_rgba_int(int x, int y, int w, int h, const int *expected)
 
 			for (p = 0; p < 4; ++p) {
 				if (fabs(probe[p] - expected[p]) >= piglit_tolerance[p]) {
-					printf("Probe at (%d,%d)\n", x+i, y+j);
+					printf("Probe color at (%d,%d)\n", x+i, y+j);
 					printf("  Expected: %d %d %d %d\n",
 					       expected[0], expected[1], expected[2], expected[3]);
 					printf("  Observed: %d %d %d %d\n",
@@ -215,7 +215,7 @@ piglit_probe_rect_rgba_uint(int x, int y, int w, int h,
 
 			for (p = 0; p < 4; ++p) {
 				if (fabs(probe[p] - expected[p]) >= piglit_tolerance[p]) {
-					printf("Probe at (%d,%d)\n", x+i, y+j);
+					printf("Probe color at (%d,%d)\n", x+i, y+j);
 					printf("  Expected: %u %u %u %u\n",
 					       expected[0], expected[1], expected[2], expected[3]);
 					printf("  Observed: %u %u %u %u\n",
@@ -423,7 +423,7 @@ int piglit_probe_pixel_rgb(int x, int y, const float* expected)
 	if (pass)
 		return 1;
 
-	printf("Probe at (%i,%i)\n", x, y);
+	printf("Probe color at (%i,%i)\n", x, y);
 	printf("  Expected: %f %f %f\n", expected[0], expected[1], expected[2]);
 	printf("  Observed: %f %f %f\n", probe[0], probe[1], probe[2]);
 
@@ -445,7 +445,7 @@ piglit_probe_rect_rgb(int x, int y, int w, int h, const float *expected)
 
 			for (p = 0; p < 3; ++p) {
 				if (fabs(probe[p] - expected[p]) >= piglit_tolerance[p]) {
-					printf("Probe at (%i,%i)\n", x+i, y+j);
+					printf("Probe color at (%i,%i)\n", x+i, y+j);
 					printf("  Expected: %f %f %f\n",
 					       expected[0], expected[1], expected[2]);
 					printf("  Observed: %f %f %f\n",
@@ -506,7 +506,7 @@ int piglit_probe_pixel_depth(int x, int y, float expected)
 	if (fabs(delta) < 0.01)
 		return 1;
 
-	printf("Probe at (%i,%i)\n", x, y);
+	printf("Probe depth at (%i,%i)\n", x, y);
 	printf("  Expected: %f\n", expected);
 	printf("  Observed: %f\n", probe);
 
@@ -526,7 +526,7 @@ int piglit_probe_rect_depth(int x, int y, int w, int h, float expected)
 			probe = &pixels[j*w+i];
 
 			if (fabs(*probe - expected) >= 0.01) {
-				printf("Probe at (%i,%i)\n", x+i, y+j);
+				printf("Probe depth at (%i,%i)\n", x+i, y+j);
 				printf("  Expected: %f\n", expected);
 				printf("  Observed: %f\n", *probe);
 
@@ -548,7 +548,7 @@ int piglit_probe_pixel_stencil(int x, int y, unsigned expected)
 	if (probe == expected)
 		return 1;
 
-	printf("Probe at (%i, %i)\n", x, y);
+	printf("Probe stencil at (%i, %i)\n", x, y);
 	printf("  Expected: %u\n", expected);
 	printf("  Observed: %u\n", probe);
 
@@ -566,7 +566,7 @@ int piglit_probe_rect_stencil(int x, int y, int w, int h, unsigned expected)
 		for (i = 0; i < w; i++) {
 			GLuint probe = pixels[j * w + i];
 			if (probe != expected) {
-				printf("Probe at (%i, %i)\n", x + i, y + j);
+				printf("Probe stencil at (%i, %i)\n", x + i, y + j);
 				printf("  Expected: %u\n", expected);
 				printf("  Observed: %u\n", probe);
 				free(pixels);
@@ -612,7 +612,7 @@ int piglit_probe_texel_rect_rgba(int target, int level, int x, int y,
 
 			for (p = 0; p < 4; ++p) {
 				if (fabs(probe[p] - expected[p]) >= piglit_tolerance[p]) {
-					printf("Probe at (%i,%i)\n", i, j);
+					printf("Probe color at (%i,%i)\n", i, j);
 					printf("  Expected: %f %f %f %f\n",
 					       expected[0], expected[1], expected[2], expected[3]);
 					printf("  Observed: %f %f %f %f\n",
@@ -676,7 +676,7 @@ int piglit_probe_texel_rect_rgb(int target, int level, int x, int y,
 
 			for (p = 0; p < 3; ++p) {
 				if (fabs(probe[p] - expected[p]) >= piglit_tolerance[p]) {
-					printf("Probe at (%i,%i)\n", i, j);
+					printf("Probe color at (%i,%i)\n", i, j);
 					printf("  Expected: %f %f %f\n",
 					       expected[0], expected[1], expected[2]);
 					printf("  Observed: %f %f %f\n",
diff --git a/tests/util/piglit-util-gles.c b/tests/util/piglit-util-gles.c
index c7f86a1..385e65e 100644
--- a/tests/util/piglit-util-gles.c
+++ b/tests/util/piglit-util-gles.c
@@ -59,7 +59,7 @@ int piglit_probe_pixel_rgba(int x, int y, const float* expected)
 	if (pass)
 		return 1;
 
-	printf("Probe at (%i,%i)\n", x, y);
+	printf("Probe color at (%i,%i)\n", x, y);
 	printf("  Expected: %f %f %f %f\n", expected[0], expected[1], expected[2], expected[3]);
 	printf("  Observed: %f %f %f %f\n", probe[0]/255.0, probe[1]/255.0, probe[2]/255.0, probe[3]/255.0);
 
@@ -81,7 +81,7 @@ piglit_probe_rect_rgba(int x, int y, int w, int h, const float *expected)
 
 			for (p = 0; p < 4; ++p) {
 				if (fabs(probe[p]/255.0 - expected[p]) >= piglit_tolerance[p]) {
-					printf("Probe at (%i,%i)\n", x+i, y+j);
+					printf("Probe color at (%i,%i)\n", x+i, y+j);
 					printf("  Expected: %f %f %f %f\n",
 					       expected[0], expected[1], expected[2], expected[3]);
 					printf("  Observed: %f %f %f %f\n",
@@ -123,7 +123,7 @@ int piglit_probe_pixel_rgb(int x, int y, const float* expected)
 	if (pass)
 		return 1;
 
-	printf("Probe at (%i,%i)\n", x, y);
+	printf("Probe color at (%i,%i)\n", x, y);
 	printf("  Expected: %f %f %f\n", expected[0], expected[1], expected[2]);
 	printf("  Observed: %f %f %f\n", probe[0]/255.0, probe[1]/255.0, probe[2]/255.0);
 
@@ -145,7 +145,7 @@ piglit_probe_rect_rgb(int x, int y, int w, int h, const float *expected)
 
 			for (p = 0; p < 3; ++p) {
 				if (fabs(probe[p]/255.0 - expected[p]) >= piglit_tolerance[p]) {
-					printf("Probe at (%i,%i)\n", x+i, y+j);
+					printf("Probe color at (%i,%i)\n", x+i, y+j);
 					printf("  Expected: %f %f %f\n",
 					       expected[0], expected[1], expected[2]);
 					printf("  Observed: %f %f %f\n",
-- 
1.7.10.4



More information about the Piglit mailing list