[Piglit] [PATCH 4/4] fs-dfdx/y-accuracy: report warn on failure

Marek Olšák maraeo at gmail.com
Wed Jun 29 00:41:21 UTC 2016


From: Marek Olšák <marek.olsak at amd.com>

---
 tests/shaders/shader_runner.c                               | 6 ++++++
 tests/spec/glsl-1.10/execution/fs-dfdx-accuracy.shader_test | 4 +++-
 tests/spec/glsl-1.10/execution/fs-dfdy-accuracy.shader_test | 4 +++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 45ba103..ee79676 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -3051,6 +3051,12 @@ piglit_display(void)
 			    !piglit_probe_rect_rgba(0, 0, render_width,
 						    render_height, c))
 				result = PIGLIT_FAIL;
+		} else if (string_match("probe warn all rgba", line)) {
+			get_floats(line + 19, c, 4);
+			if (result == PIGLIT_PASS &&
+			    !piglit_probe_rect_rgba(0, 0, render_width,
+						    render_height, c))
+				result = PIGLIT_WARN;
 		} else if (string_match("probe all rgb", line)) {
 			get_floats(line + 13, c, 3);
 			if (result != PIGLIT_FAIL &&
diff --git a/tests/spec/glsl-1.10/execution/fs-dfdx-accuracy.shader_test b/tests/spec/glsl-1.10/execution/fs-dfdx-accuracy.shader_test
index e301243..d38405f 100644
--- a/tests/spec/glsl-1.10/execution/fs-dfdx-accuracy.shader_test
+++ b/tests/spec/glsl-1.10/execution/fs-dfdx-accuracy.shader_test
@@ -7,6 +7,8 @@
 # This test computes dFdx(x*y), which should exactly equal y at every
 # pixel, regardless of whether forward or backward differencing is
 # used.
+#
+# The test expects that GL_FRAGMENT_SHADER_DERIVATIVE_HINT is not ignored.
 
 [require]
 GLSL >= 1.10
@@ -33,4 +35,4 @@ void main()
 [test]
 hint GL_FRAGMENT_SHADER_DERIVATIVE_HINT GL_NICEST
 draw rect -1 -1 2 2
-probe all rgba 0.0 1.0 0.0 1.0
+probe warn all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/glsl-1.10/execution/fs-dfdy-accuracy.shader_test b/tests/spec/glsl-1.10/execution/fs-dfdy-accuracy.shader_test
index 9f11c06..fc82ecd 100644
--- a/tests/spec/glsl-1.10/execution/fs-dfdy-accuracy.shader_test
+++ b/tests/spec/glsl-1.10/execution/fs-dfdy-accuracy.shader_test
@@ -7,6 +7,8 @@
 # This test computes dFdy(x*y), which should exactly equal x at every
 # pixel, regardless of whether forward or backward differencing is
 # used.
+#
+# The test expects that GL_FRAGMENT_SHADER_DERIVATIVE_HINT is not ignored.
 
 [require]
 GLSL >= 1.10
@@ -33,4 +35,4 @@ void main()
 [test]
 hint GL_FRAGMENT_SHADER_DERIVATIVE_HINT GL_NICEST
 draw rect -1 -1 2 2
-probe all rgba 0.0 1.0 0.0 1.0
+probe warn all rgba 0.0 1.0 0.0 1.0
-- 
2.7.4



More information about the Piglit mailing list