[v2,17/37] glean/tfragprog1: port MAX test to shader_runner

Submitted by Dylan Baker on Sept. 6, 2016, 7:20 p.m.

Details

Message ID 3de89fbbda0cb7e813007f57f6fcf90ca8af563c.1473189647.git-series.dylan@pnwbakers.com
State New
Headers show
Series "Port Glean Frag-prog tests to shader_runner" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Dylan Baker Sept. 6, 2016, 7:20 p.m.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
---
 tests/all.py                                                       |  1 -
 tests/glean/tfragprog1.cpp                                         | 14 --------------
 tests/spec/arb_fragment_program/built-in-functions/max.shader_test | 18 ++++++++++++++++++
 3 files changed, 18 insertions(+), 15 deletions(-)
 create mode 100644 tests/spec/arb_fragment_program/built-in-functions/max.shader_test

Patch hide | download patch | download mbox

diff --git a/tests/all.py b/tests/all.py
index bf4e60f..3c6d9a1 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 = [
-                  'MAX test',
                   'MIN test',
                   'MOV test',
                   'MUL test',
diff --git a/tests/glean/tfragprog1.cpp b/tests/glean/tfragprog1.cpp
index 9254e11..2a77702 100644
--- a/tests/glean/tfragprog1.cpp
+++ b/tests/glean/tfragprog1.cpp
@@ -82,20 +82,6 @@  static GLfloat FogCoord = 50.0;  /* Between FogStart and FogEnd */
 // Alphabetical order, please
 static const FragmentProgram Programs[] = {
 	{
-		"MAX test",
-		"!!ARBfp1.0\n"
-		"PARAM p1 = program.local[1]; \n"
-		"PARAM p2 = program.local[2]; \n"
-		"MAX result.color, p1, p2; \n"
-		"END \n",
-		{ MAX(Param1[0], Param2[0]),
-		  MAX(Param1[1], Param2[1]),
-		  MAX(Param1[2], Param2[2]),
-		  MAX(Param1[3], Param2[3]),
-		},
-		DONT_CARE_Z
-	},
-	{
 		"MIN test",
 		"!!ARBfp1.0\n"
 		"PARAM p1 = program.local[1]; \n"
diff --git a/tests/spec/arb_fragment_program/built-in-functions/max.shader_test b/tests/spec/arb_fragment_program/built-in-functions/max.shader_test
new file mode 100644
index 0000000..c9a175a
--- /dev/null
+++ b/tests/spec/arb_fragment_program/built-in-functions/max.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];
+MAX result.color, p, q;
+END
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+clear
+
+parameter local_fp 0 (1.0, 0.5, 0.0, -1.0)
+parameter local_fp 1 (0.5, 1.0, 1.0,  1.0)
+draw rect -1 -1 2 2
+probe all rgba 1.0 1.0 1.0 1.0