[Piglit] [PATCH 2/2] fdo30337{a, b}: New tests for radeon presubtract.

Tom Stellard tstellar at gmail.com
Sat Sep 25 22:39:51 PDT 2010


---
 tests/radeon.tests                   |    3 +++
 tests/shaders/generic/fdo30337a.vpfp |   14 ++++++++++++++
 tests/shaders/generic/fdo30337b.vpfp |   16 ++++++++++++++++
 3 files changed, 33 insertions(+), 0 deletions(-)
 create mode 100644 tests/shaders/generic/fdo30337a.vpfp
 create mode 100644 tests/shaders/generic/fdo30337b.vpfp

diff --git a/tests/radeon.tests b/tests/radeon.tests
index b1489d8..14378ab 100644
--- a/tests/radeon.tests
+++ b/tests/radeon.tests
@@ -16,3 +16,6 @@ from framework.gleantest import *
 env = profile.tests['glean']['exactRGBA'].env
 env['GLEAN_EXACTRGBA_ROUNDING'] = 1
 
+#These test the presubtract.
+add_vpfpgeneric('fdo30337a')
+add_vpfpgeneric('fdo30337b')
diff --git a/tests/shaders/generic/fdo30337a.vpfp b/tests/shaders/generic/fdo30337a.vpfp
new file mode 100644
index 0000000..f77a302
--- /dev/null
+++ b/tests/shaders/generic/fdo30337a.vpfp
@@ -0,0 +1,14 @@
+!!ARBvp1.0
+OPTION ARB_position_invariant;
+END
+
+!!ARBfp1.0
+TEMP color;
+MOV color, {0.1, 0.4, 0.8, 1.0};
+ADD color.x, color.x, color.x;
+ADD color.y, color.x, color.y;
+MOV result.color, color;
+END
+
+!!test
+expected          0.2     0.6      0.8      1.0
diff --git a/tests/shaders/generic/fdo30337b.vpfp b/tests/shaders/generic/fdo30337b.vpfp
new file mode 100644
index 0000000..22d1cd3
--- /dev/null
+++ b/tests/shaders/generic/fdo30337b.vpfp
@@ -0,0 +1,16 @@
+!!ARBvp1.0
+OPTION ARB_position_invariant;
+END
+
+!!ARBfp1.0
+TEMP color;
+MOV color, {0.1, 0.4, 0.8, 1.0};
+SUB color.x, color.x, color.x;
+ADD color.y, color.x, color.y;
+SUB color.z, color.x, color.x;
+DP3 color.w, color, color;
+MOV result.color, color;
+END
+
+!!test
+expected          0.0     0.4      0.0      0.16
-- 
1.7.2.2



More information about the Piglit mailing list