[Piglit] [PATCH 03/25] glean/tfragprog1: port LRP test to shader_runner

Dylan Baker dylan at pnwbakers.com
Fri Apr 29 16:50:13 UTC 2016


It's worth noting that this test wasn't included in all.py, and
therefore hasn't been running.

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

diff --git a/tests/glean/tfragprog1.cpp b/tests/glean/tfragprog1.cpp
index f26f07f..bb79963 100644
--- a/tests/glean/tfragprog1.cpp
+++ b/tests/glean/tfragprog1.cpp
@@ -81,20 +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[] = {
-        {
-		"LRP test",
-		"!!ARBfp1.0\n"
-		"PARAM p1 = program.local[1]; \n"
-		"PARAM t = {0.2, 0.5, 1.0, 0.0}; \n"
-		"LRP result.color, t, fragment.color, p1; \n"
-		"END \n",
-		{ 0.2 * FragColor[0] + (1.0 - 0.2) * Param1[0],
-		  0.5 * FragColor[1] + (1.0 - 0.5) * Param1[1],
-		  1.0 * FragColor[2] + (1.0 - 1.0) * Param1[2],
-		  0.0 * FragColor[3] + (1.0 - 0.0) * Param1[3]
-		},
-		DONT_CARE_Z
-	},
 	{
 		"MAD test",
 		"!!ARBfp1.0\n"
diff --git a/tests/spec/arb_fragment_program/built-in-functions/lrp.shader_test b/tests/spec/arb_fragment_program/built-in-functions/lrp.shader_test
new file mode 100644
index 0000000..96a55c2
--- /dev/null
+++ b/tests/spec/arb_fragment_program/built-in-functions/lrp.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];
+LRP result.color, p, q, r;
+END
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+clear
+
+parameter local_fp 0 (0.5, 0.25, 1.0, 0.5)
+parameter local_fp 1 (0.2, 0.5, 0.8, 0.0)
+parameter local_fp 2 (0.3, 0.2, 0.1, 0.4)
+draw rect -1 -1 2 2
+probe all rgba 0.25 0.275 0.8 0.2
-- 
2.8.0



More information about the Piglit mailing list