[Piglit] [PATCH 4/4] Auto-generate glsl-const-builtin-{equal, notEqual}-XX shader tests.

Kenneth Graunke kenneth at whitecape.org
Sat May 17 01:58:38 PDT 2014


Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 generated_tests/CMakeLists.txt                        |  4 ++++
 tests/shaders/glsl-const-builtin-equal-02.shader_test | 19 -------------------
 tests/shaders/glsl-const-builtin-equal-03.shader_test | 19 -------------------
 tests/shaders/glsl-const-builtin-equal-04.shader_test | 19 -------------------
 tests/shaders/glsl-const-builtin-equal-05.shader_test | 19 -------------------
 tests/shaders/glsl-const-builtin-equal-06.shader_test | 19 -------------------
 tests/shaders/glsl-const-builtin-equal-07.shader_test | 19 -------------------
 tests/shaders/glsl-const-builtin-equal-08.shader_test | 19 -------------------
 tests/shaders/glsl-const-builtin-equal-09.shader_test | 19 -------------------
 tests/shaders/glsl-const-builtin-equal-10.shader_test | 19 -------------------
 .../glsl-const-builtin-notEqual-02.shader_test        | 19 -------------------
 .../glsl-const-builtin-notEqual-03.shader_test        | 19 -------------------
 .../glsl-const-builtin-notEqual-04.shader_test        | 19 -------------------
 .../glsl-const-builtin-notEqual-05.shader_test        | 19 -------------------
 .../glsl-const-builtin-notEqual-06.shader_test        | 19 -------------------
 .../glsl-const-builtin-notEqual-07.shader_test        | 19 -------------------
 .../glsl-const-builtin-notEqual-08.shader_test        | 19 -------------------
 .../glsl-const-builtin-notEqual-09.shader_test        | 19 -------------------
 .../glsl-const-builtin-notEqual-10.shader_test        | 19 -------------------
 19 files changed, 4 insertions(+), 342 deletions(-)
 delete mode 100644 tests/shaders/glsl-const-builtin-equal-02.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-equal-03.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-equal-04.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-equal-05.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-equal-06.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-equal-07.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-equal-08.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-equal-09.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-equal-10.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-notEqual-02.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-notEqual-03.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-notEqual-04.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-notEqual-05.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-notEqual-06.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-notEqual-07.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-notEqual-08.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-notEqual-09.shader_test
 delete mode 100644 tests/shaders/glsl-const-builtin-notEqual-10.shader_test

This does change the tests' place in the hierarchy, but I think that's fine.

diff --git a/generated_tests/CMakeLists.txt b/generated_tests/CMakeLists.txt
index b94b7f2..87311e9 100644
--- a/generated_tests/CMakeLists.txt
+++ b/generated_tests/CMakeLists.txt
@@ -31,6 +31,9 @@ piglit_make_generated_tests(
 	gen_constant_array_size_tests.py
 	builtin_function.py)
 piglit_make_generated_tests(
+	const_builtin_equal_tests.list
+	gen_const_builtin_equal_tests.py)
+piglit_make_generated_tests(
 	interpolation_tests.list
 	gen_interpolation_tests.py)
 piglit_make_generated_tests(
@@ -89,6 +92,7 @@ add_custom_target(gen-tests ALL
 		outerproduct_invalid_params.list
 		builtin_uniform_tests.list
 		constant_array_size_tests.list
+		const_builtin_equal_tests.list
 		builtin_cl_int_tests.list
 		builtin_cl_math_tests.list
 		builtin_cl_relational_tests.list
diff --git a/tests/shaders/glsl-const-builtin-equal-02.shader_test b/tests/shaders/glsl-const-builtin-equal-02.shader_test
deleted file mode 100644
index e1f5f24..0000000
--- a/tests/shaders/glsl-const-builtin-equal-02.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec2 res = equal(vec2(3.0, 3.14),
-                          vec2(-6.0, 7.88));
-  gl_FragColor = (res == bvec2(false, false))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-equal-03.shader_test b/tests/shaders/glsl-const-builtin-equal-03.shader_test
deleted file mode 100644
index a872ac4..0000000
--- a/tests/shaders/glsl-const-builtin-equal-03.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec3 res = equal(vec3(13.4, -0.9, 12.55),
-                          vec3(13.4, 12.0, -55.3));
-  gl_FragColor = (res == bvec3(true, false, false))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-equal-04.shader_test b/tests/shaders/glsl-const-builtin-equal-04.shader_test
deleted file mode 100644
index 4bc22db..0000000
--- a/tests/shaders/glsl-const-builtin-equal-04.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec4 res = equal(vec4(-2.0, 0.0, 0.123, -1000.5),
-                          vec4(-2.4, 0.0, 0.456, 12.5));
-  gl_FragColor = (res == bvec4(false, true, false, false))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-equal-05.shader_test b/tests/shaders/glsl-const-builtin-equal-05.shader_test
deleted file mode 100644
index f30fa1b..0000000
--- a/tests/shaders/glsl-const-builtin-equal-05.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec2 res = equal(ivec2(-8, 12),
-                          ivec2(-19, 12));
-  gl_FragColor = (res == bvec2(false, true))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-equal-06.shader_test b/tests/shaders/glsl-const-builtin-equal-06.shader_test
deleted file mode 100644
index 1ad26ae..0000000
--- a/tests/shaders/glsl-const-builtin-equal-06.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec3 res = equal(ivec3(0, 8, 89),
-                          ivec3(4, -7, 33));
-  gl_FragColor = (res == bvec3(false, false, false))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-equal-07.shader_test b/tests/shaders/glsl-const-builtin-equal-07.shader_test
deleted file mode 100644
index 32f2d7c..0000000
--- a/tests/shaders/glsl-const-builtin-equal-07.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec4 res = equal(ivec4(11, 1000, 1, -18),
-                          ivec4(55, 1000, -21, -17));
-  gl_FragColor = (res == bvec4(false, true, false, false))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-equal-08.shader_test b/tests/shaders/glsl-const-builtin-equal-08.shader_test
deleted file mode 100644
index 69577e9..0000000
--- a/tests/shaders/glsl-const-builtin-equal-08.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec2 res = equal(bvec2(true, false),
-                          bvec2(true, true));
-  gl_FragColor = (res == bvec2(true, false))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-equal-09.shader_test b/tests/shaders/glsl-const-builtin-equal-09.shader_test
deleted file mode 100644
index 2f7d7f3..0000000
--- a/tests/shaders/glsl-const-builtin-equal-09.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec3 res = equal(bvec3(false, true, false),
-                          bvec3(false, false, true));
-  gl_FragColor = (res == bvec3(true, false, false))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-equal-10.shader_test b/tests/shaders/glsl-const-builtin-equal-10.shader_test
deleted file mode 100644
index fbc8afc..0000000
--- a/tests/shaders/glsl-const-builtin-equal-10.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec4 res = equal(bvec4(true, false, false, true),
-                          bvec4(true, true, false, false));
-  gl_FragColor = (res == bvec4(true, false, true, false))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-notEqual-02.shader_test b/tests/shaders/glsl-const-builtin-notEqual-02.shader_test
deleted file mode 100644
index f1261f3..0000000
--- a/tests/shaders/glsl-const-builtin-notEqual-02.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec2 res = notEqual(vec2(3.0, 3.14),
-                             vec2(-6.0, 7.88));
-  gl_FragColor = (res == bvec2(true, true))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-notEqual-03.shader_test b/tests/shaders/glsl-const-builtin-notEqual-03.shader_test
deleted file mode 100644
index 65bc670..0000000
--- a/tests/shaders/glsl-const-builtin-notEqual-03.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec3 res = notEqual(vec3(13.4, -0.9, 12.55),
-                             vec3(13.4, 12.0, -55.3));
-  gl_FragColor = (res == bvec3(false, true, true))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-notEqual-04.shader_test b/tests/shaders/glsl-const-builtin-notEqual-04.shader_test
deleted file mode 100644
index 29e5324..0000000
--- a/tests/shaders/glsl-const-builtin-notEqual-04.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec4 res = notEqual(vec4(-2.0, 0.0, 0.123, -1000.5),
-                             vec4(-2.4, 0.0, 0.456, 12.5));
-  gl_FragColor = (res == bvec4(true, false, true, true))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-notEqual-05.shader_test b/tests/shaders/glsl-const-builtin-notEqual-05.shader_test
deleted file mode 100644
index 3ef5080..0000000
--- a/tests/shaders/glsl-const-builtin-notEqual-05.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec2 res = notEqual(ivec2(-8, 12),
-                             ivec2(-19, 12));
-  gl_FragColor = (res == bvec2(true, false))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-notEqual-06.shader_test b/tests/shaders/glsl-const-builtin-notEqual-06.shader_test
deleted file mode 100644
index 08a866e..0000000
--- a/tests/shaders/glsl-const-builtin-notEqual-06.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec3 res = notEqual(ivec3(0, 8, 89),
-                             ivec3(4, -7, 33));
-  gl_FragColor = (res == bvec3(true, true, true))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-notEqual-07.shader_test b/tests/shaders/glsl-const-builtin-notEqual-07.shader_test
deleted file mode 100644
index 3687a09..0000000
--- a/tests/shaders/glsl-const-builtin-notEqual-07.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec4 res = notEqual(ivec4(11, 1000, 1, -18),
-                             ivec4(55, 1000, -21, -17));
-  gl_FragColor = (res == bvec4(true, false, true, true))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-notEqual-08.shader_test b/tests/shaders/glsl-const-builtin-notEqual-08.shader_test
deleted file mode 100644
index 149b083..0000000
--- a/tests/shaders/glsl-const-builtin-notEqual-08.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec2 res = notEqual(bvec2(true, false),
-                             bvec2(true, true));
-  gl_FragColor = (res == bvec2(false, true))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-notEqual-09.shader_test b/tests/shaders/glsl-const-builtin-notEqual-09.shader_test
deleted file mode 100644
index e9ffb49..0000000
--- a/tests/shaders/glsl-const-builtin-notEqual-09.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec3 res = notEqual(bvec3(false, true, false),
-                             bvec3(false, false, true));
-  gl_FragColor = (res == bvec3(false, true, true))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
diff --git a/tests/shaders/glsl-const-builtin-notEqual-10.shader_test b/tests/shaders/glsl-const-builtin-notEqual-10.shader_test
deleted file mode 100644
index 4e37211..0000000
--- a/tests/shaders/glsl-const-builtin-notEqual-10.shader_test
+++ /dev/null
@@ -1,19 +0,0 @@
-
-[require]
-GLSL >= 1.20
-
-[vertex shader file]
-glsl-mvp.vert
-
-[fragment shader]
-void main()
-{
-  const bvec4 res = notEqual(bvec4(true, false, false, true),
-                             bvec4(true, true, false, false));
-  gl_FragColor = (res == bvec4(false, true, false, true))
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
-}
-
-[test]
-draw rect -1 -1 2 2
-probe all rgb 0.0 1.0 0.0
-- 
1.9.2



More information about the Piglit mailing list