This also adds a similar CMP_SAT test.

Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 tests/all.py                                                           |  1 -
 tests/glean/tfragprog1.cpp                                             | 11 
-----------
 tests/spec/arb_fragment_program/built-in-functions/cmp.shader_test     | 20 
++++++++++++++++++++
 tests/spec/arb_fragment_program/built-in-functions/cmp_sat.shader_test | 20 
++++++++++++++++++++
 4 files changed, 40 insertions(+), 12 deletions(-)
 create mode 100644 
tests/spec/arb_fragment_program/built-in-functions/cmp.shader_test
 create mode 100644 
tests/spec/arb_fragment_program/built-in-functions/cmp_sat.shader_test

diff --git a/tests/all.py b/tests/all.py
index e655251..5a86c32 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -376,7 +376,6 @@ glean_glsl_tests = ['Primary plus secondary color',
                     'texcoord varying']
 
 glean_fp_tests = [
-                  'CMP test',
                   'COS test',
                   'COS test 2',
                   'DP3 test',
diff --git a/tests/glean/tfragprog1.cpp b/tests/glean/tfragprog1.cpp
index 1cbe243..878e7ac 100644
--- a/tests/glean/tfragprog1.cpp
+++ b/tests/glean/tfragprog1.cpp
@@ -82,17 +82,6 @@ static GLfloat FogCoord = 50.0;  /* Between FogStart and 
FogEnd */
 // Alphabetical order, please
 static const FragmentProgram Programs[] = {
        {
-               "CMP test",
-               "!!ARBfp1.0\n"
-               "PARAM zero = program.local[0]; \n"
-               "PARAM p1 = program.local[1]; \n"
-               "PARAM p2 = program.local[2]; \n"
-               "CMP result.color, p2, zero, p1; \n"
-               "END \n",
-               { Param0[0], Param1[1], Param1[2], Param0[3] },
-               DONT_CARE_Z
-       },
-       {
                "COS test",
                "!!ARBfp1.0\n"
                "PARAM values = { 0.0, 3.14159, 0.5, 1.0 }; \n"
diff --git a/tests/spec/arb_fragment_program/built-in-functions/cmp.shader_test 
b/tests/spec/arb_fragment_program/built-in-functions/cmp.shader_test
new file mode 100644
index 0000000..eb89a17
--- /dev/null
+++ b/tests/spec/arb_fragment_program/built-in-functions/cmp.shader_test
@@ -0,0 +1,20 @@
+[require]
+GL_ARB_fragment_program
+
+[fragment program]
+!!ARBfp1.0
+PARAM p = program.local[0];
+PARAM q = program.local[1];
+PARAM r = program.local[2];
+CMP result.color, p, q, r;
+END
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+clear
+
+parameter local_fp 0 ( -1.0, 0.0, 1.0, 0.5 )
+parameter local_fp 1 (  0.0, 0.0, 1.0, 1.0 )
+parameter local_fp 2 (  1.0, 1.0, 0.0, 0.0 )
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 0.0
diff --git 
a/tests/spec/arb_fragment_program/built-in-functions/cmp_sat.shader_test 
b/tests/spec/arb_fragment_program/built-in-functions/cmp_sat.shader_test
new file mode 100644
index 0000000..48fdc13
--- /dev/null
+++ b/tests/spec/arb_fragment_program/built-in-functions/cmp_sat.shader_test
@@ -0,0 +1,20 @@
+[require]
+GL_ARB_fragment_program
+
+[fragment program]
+!!ARBfp1.0
+PARAM p = program.local[0];
+PARAM q = program.local[1];
+PARAM r = program.local[2];
+CMP_SAT result.color, p, q, r;
+END
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+clear
+
+parameter local_fp 0 ( -1.0, 0.0, 1.0, 0.5 )
+parameter local_fp 1 (  0.0, 0.0, 1.0, 1.0 )
+parameter local_fp 2 (  2.0, 1.0, 0.0, 0.0 )
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 0.0
-- 
git-series 0.8.10
_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to