Thanks to Ken for helping me work out a couple of bugs in this test.

Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 tests/all.py                                        |  1 +-
 tests/glean/tfragprog1.cpp                          | 15 +----------
 tests/spec/arb_fragment_program/z-write.shader_test | 21 ++++++++++++++-
 3 files changed, 21 insertions(+), 16 deletions(-)
 create mode 100644 tests/spec/arb_fragment_program/z-write.shader_test

diff --git a/tests/all.py b/tests/all.py
index 682b8c9..596501d 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 = [
-                  'Z-write test',
                   'Divide by zero test',
                   'Infinity and nan test',
 ]
diff --git a/tests/glean/tfragprog1.cpp b/tests/glean/tfragprog1.cpp
index abee647..340da20 100644
--- a/tests/glean/tfragprog1.cpp
+++ b/tests/glean/tfragprog1.cpp
@@ -81,21 +81,6 @@ static GLfloat FogCoord = 50.0;  /* Between FogStart and 
FogEnd */
 // These are the specific fragment programs which we'll test
 // Alphabetical order, please
 static const FragmentProgram Programs[] = {
-       {
-               "Z-write test",
-               "!!ARBfp1.0\n"
-               "PARAM p = program.local[1]; \n"
-               "MOV result.color, p; \n"
-               "MOV result.depth.z, p.y; \n"
-               "END \n",
-               { Param1[0],
-                 Param1[1],
-                 Param1[2],
-                 Param1[3]
-               },
-               Param1[1]
-       },
-
        // ============= Numeric stress tests =================================
        // Basically just check that we don't crash when we do divides by
        // zero, etc.
diff --git a/tests/spec/arb_fragment_program/z-write.shader_test 
b/tests/spec/arb_fragment_program/z-write.shader_test
new file mode 100644
index 0000000..64609f2
--- /dev/null
+++ b/tests/spec/arb_fragment_program/z-write.shader_test
@@ -0,0 +1,21 @@
+[require]
+GL_ARB_fragment_program
+depthbuffer
+
+[fragment program]
+!!ARBfp1.0
+PARAM p = program.local[0];
+MOV result.color, p;
+MOV result.depth.z, p.y;
+END
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+clear depth 0.75
+clear
+enable GL_DEPTH_TEST
+
+parameter local_fp 0 (0.5, 0.25, 1.0, 0.5)
+draw rect -1 -1 2 2
+probe all rgba 0.5 0.25 1.0 0.5  # Just to be sure the color doesn't change
+probe depth 0 0 0.25
-- 
git-series 0.8.10
_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to