[Piglit] [PATCH 06/37] glean/tfragprog1: port DP3 tests to shader_runner

Dylan Baker dylan at pnwbakers.com
Thu Apr 28 21:38:28 UTC 2016


This ports the first test and just removes the second test, which like
some of the other dropped tests doesn't really focus on DP3, or on a
reported bug for DP3, it just adds complexity.

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

diff --git a/tests/all.py b/tests/all.py
index 91dec52..004760e 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -376,8 +376,6 @@ glean_glsl_tests = ['Primary plus secondary color',
                     'texcoord varying']
 
 glean_fp_tests = [
-                  'DP3 test',
-                  'DP3 test (2)',
                   'DP4 test',
                   'DPH test',
                   'DST test',
diff --git a/tests/glean/tfragprog1.cpp b/tests/glean/tfragprog1.cpp
index 85e8ecd..bf95a20 100644
--- a/tests/glean/tfragprog1.cpp
+++ b/tests/glean/tfragprog1.cpp
@@ -82,33 +82,6 @@ static GLfloat FogCoord = 50.0;  /* Between FogStart and FogEnd */
 // Alphabetical order, please
 static const FragmentProgram Programs[] = {
 	{
-		"DP3 test",
-		"!!ARBfp1.0\n"
-		"PARAM p1 = program.local[1]; \n"
-		"DP3 result.color, p1, fragment.color; \n"
-		"END \n",
-		{ SMEAR(CLAMP01(Param1[0] * FragColor[0] +
-                                Param1[1] * FragColor[1] +
-                                Param1[2] * FragColor[2]))
-		},
-		DONT_CARE_Z
-	},
-	{
-		"DP3 test (2)",
-		"!!ARBfp1.0\n"
-		"PARAM p1 = program.local[1]; \n"
-		"TEMP t, r; \n"
-		"MOV t, p1; \n"
-		"DP3 r.x, t, t; \n"
-		"MUL result.color, r.xxxx, 0.5; \n"
-		"END \n",
-		{ SMEAR(CLAMP01((Param1[0] * Param1[0] +
-				 Param1[1] * Param1[1] +
-				 Param1[2] * Param1[2]) * 0.5))
-		},
-		DONT_CARE_Z
-	},
-	{
 		"DP4 test",
 		"!!ARBfp1.0\n"
 		"PARAM p1 = program.local[1]; \n"
diff --git a/tests/spec/arb_fragment_program/built-in-functions/dp3.shader_test b/tests/spec/arb_fragment_program/built-in-functions/dp3.shader_test
new file mode 100644
index 0000000..43095a4
--- /dev/null
+++ b/tests/spec/arb_fragment_program/built-in-functions/dp3.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];
+DP3 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.37 0.37 0.37 0.37
-- 
2.8.0



More information about the Piglit mailing list