[Piglit] [PATCH 01/25] glean/tfragprog1: port LG2 test to shader_runner

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


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

diff --git a/tests/all.py b/tests/all.py
index 55c1cda..093c2b0 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 = [
-                  'LG2 test',
                   'LIT test 1',
                   'LIT test 2 (degenerate case: 0 ^ 0 -> 1)',
                   'LIT test 3 (case x < 0)',
diff --git a/tests/glean/tfragprog1.cpp b/tests/glean/tfragprog1.cpp
index a65fa38..91f1171 100644
--- a/tests/glean/tfragprog1.cpp
+++ b/tests/glean/tfragprog1.cpp
@@ -82,25 +82,6 @@ static GLfloat FogCoord = 50.0;  /* Between FogStart and FogEnd */
 // Alphabetical order, please
 static const FragmentProgram Programs[] = {
 	{
-		"LG2 test",
-		"!!ARBfp1.0\n"
-		"PARAM values = {64.0, 1, 30, 4}; \n"
-		"PARAM scale = {0.1, 0.1, 0.1, 0.1}; \n"
-		"TEMP t; \n"
-		"LG2 t.x, values.x; \n"
-		"LG2 t.y, values.y; \n"
-		"LG2 t.z, values.z; \n"
-		"LG2 t.w, values.w; \n"
-		"MUL result.color, t, scale; \n"
-		"END \n",
-		{ 0.6,
-		  0.0,
-		  0.49,
-		  0.2
-		},
-		DONT_CARE_Z
-	},
-	{
 		"LIT test 1",
 		"!!ARBfp1.0\n"
 		"PARAM values = {0.65, 0.9, 0.0, 8.0}; \n"
diff --git a/tests/spec/arb_fragment_program/built-in-functions/lg2.shader_test b/tests/spec/arb_fragment_program/built-in-functions/lg2.shader_test
new file mode 100644
index 0000000..eaa1f35
--- /dev/null
+++ b/tests/spec/arb_fragment_program/built-in-functions/lg2.shader_test
@@ -0,0 +1,22 @@
+[require]
+GL_ARB_fragment_program
+
+[fragment program]
+!!ARBfp1.0
+PARAM p = program.local[0];
+PARAM scale = {0.1, 0.1, 0.1, 0.1};
+TEMP t;
+LG2 t.x, p.x;
+LG2 t.y, p.y;
+LG2 t.z, p.z;
+LG2 t.w, p.w;
+MUL result.color, t, scale;
+END
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+clear
+
+parameter local_fp 0 (64.0, 1.0, 30.0, 4.0)
+draw rect -1 -1 2 2 
+probe all rgba 0.6 0.0 0.49 0.2
-- 
2.8.0



More information about the Piglit mailing list