[Piglit] [PATCH 08/37] glean/tfragprog1: port DPH test to shader_runner

Dylan Baker dylan at pnwbakers.com
Mon May 2 21:59:10 UTC 2016


This is a simplified version of the same test, but without some extra
operations.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 tests/all.py                                           |  1 -
 tests/glean/tfragprog1.cpp                             | 16 ----------------
 .../built-in-functions/dph.shader_test                 | 18 ++++++++++++++++++
 3 files changed, 18 insertions(+), 17 deletions(-)
 create mode 100644 tests/spec/arb_fragment_program/built-in-functions/dph.shader_test

diff --git a/tests/all.py b/tests/all.py
index 4da4821..959d131 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 = [
-                  'DPH test',
                   'DST test',
                   'EX2 test',
                   'FLR test',
diff --git a/tests/glean/tfragprog1.cpp b/tests/glean/tfragprog1.cpp
index 0028b39..2c56f28 100644
--- a/tests/glean/tfragprog1.cpp
+++ b/tests/glean/tfragprog1.cpp
@@ -82,22 +82,6 @@ static GLfloat FogCoord = 50.0;  /* Between FogStart and FogEnd */
 // Alphabetical order, please
 static const FragmentProgram Programs[] = {
 	{
-		"DPH test",
-		"!!ARBfp1.0\n"
-		"PARAM p1 = program.local[1]; \n"
-                "PARAM scale = {0.1, 0.1, 0.1, 0.1}; \n"
-                "TEMP t; \n"
-		"DPH t, p1, fragment.color; \n"
-		"MUL result.color, t, scale; \n"
-		"END \n",
-		{ SMEAR(CLAMP01((Param1[0] * FragColor[0] +
-                                 Param1[1] * FragColor[1] +
-                                 Param1[2] * FragColor[2] +
-                                 FragColor[3]) * 0.1))
-		},
-		DONT_CARE_Z
-	},
-	{
 		"DST test",
 		"!!ARBfp1.0\n"
 		"# let d = 0.4 \n"
diff --git a/tests/spec/arb_fragment_program/built-in-functions/dph.shader_test b/tests/spec/arb_fragment_program/built-in-functions/dph.shader_test
new file mode 100644
index 0000000..b63e5b2
--- /dev/null
+++ b/tests/spec/arb_fragment_program/built-in-functions/dph.shader_test
@@ -0,0 +1,18 @@
+[require]
+GL_ARB_fragment_program
+
+[fragment program]
+!!ARBfp1.0
+PARAM p = program.local[0];
+PARAM q = program.local[1];
+DPH result.color, p, q;
+END
+
+[test]
+clear color 1.0 1.0 1.0 1.0
+clear
+
+parameter local_fp 0 (0.4, 0.6, 0.7, 0.5)
+parameter local_fp 1 (0.1, 0.2, 0.3, 0.4)
+draw rect -1 -1 2 2
+probe all rgba 0.77 0.77 0.77 0.77
-- 
2.8.2



More information about the Piglit mailing list