[Piglit] [PATCH] glsl-fs-user-varying-ff: make the result more reliable

Vadim Girlin vadimgirlin at gmail.com
Fri Aug 31 12:00:33 PDT 2012


The test is not reliable, because in the "correct" case the result is 
"undefined" and the test tries to check it by comparing it with some constant.
"undefined" value _probably_ will not be equal, but it still could be equal. The
test randomly fails sometimes with r600g.

Decreases probability of the false fail by probing the whole drawn rectangle
instead of a single pixel.

---
 tests/shaders/glsl-fs-user-varying-ff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/shaders/glsl-fs-user-varying-ff.c b/tests/shaders/glsl-fs-user-varying-ff.c
index e1143ab..1d547f9 100644
--- a/tests/shaders/glsl-fs-user-varying-ff.c
+++ b/tests/shaders/glsl-fs-user-varying-ff.c
@@ -59,7 +59,7 @@ piglit_display(void)
 	/* The vertex shader is passing green to the fragment shader in an
 	 * illegal way.  The rendered result must not be green!
 	 */
-	if (piglit_probe_pixel_rgb(15, 15, green))
+	if (piglit_probe_rect_rgb(10, 10, 10, 10, green))
 		result = PIGLIT_FAIL;
 
 	if (!piglit_automatic)
-- 
1.7.11.4



More information about the Piglit mailing list