[Piglit] [PATCH] glsl-1.10: add tests of vector relation functions

Boyan Ding boyan.j.ding at gmail.com
Mon Nov 7 11:55:46 UTC 2016


Signed-off-by: Boyan Ding <boyan.j.ding at gmail.com>
---
 .../compiler/builtin-functions/scalar-equal.vert   | 23 ++++++++++++++++++++++
 .../builtin-functions/scalar-greaterthan.vert      | 22 +++++++++++++++++++++
 .../builtin-functions/scalar-greaterthanequal.vert | 22 +++++++++++++++++++++
 .../builtin-functions/scalar-lessthan.vert         | 22 +++++++++++++++++++++
 .../builtin-functions/scalar-lessthanequal.vert    | 22 +++++++++++++++++++++
 .../builtin-functions/scalar-notequal.vert         | 23 ++++++++++++++++++++++
 6 files changed, 134 insertions(+)
 create mode 100644 tests/spec/glsl-1.10/compiler/builtin-functions/scalar-equal.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/builtin-functions/scalar-greaterthan.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/builtin-functions/scalar-greaterthanequal.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/builtin-functions/scalar-lessthan.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/builtin-functions/scalar-lessthanequal.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/builtin-functions/scalar-notequal.vert

diff --git a/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-equal.vert b/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-equal.vert
new file mode 100644
index 0000000..dcab716
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-equal.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+//
+// According to Section 8.6 of the GLSL 1.10 spec:
+//     For vector results, use the following built-in functions. Below,
+//     "bvec" is a placeholder for one of bvec2, bvec3, or bvec4, "ivec"
+//     is a placeholder for one of ivec2, ivec3, or ivec4, and "vec" is
+//     a placeholder for vec2, vec3, or vec4.
+//         ...
+//     bvec equal(vec x, vec y)
+//     bvec equal(ivec x, ivec y)
+//     bvec equal(bvec x, bvec y)
+
+
+#version 110
+
+void main()
+{
+	bool result = equal(0.0, 0.0);
+	gl_Position = vec4(0.0);
+}
diff --git a/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-greaterthan.vert b/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-greaterthan.vert
new file mode 100644
index 0000000..3c25f4d
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-greaterthan.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+//
+// According to Section 8.6 of the GLSL 1.10 spec:
+//     For vector results, use the following built-in functions. Below,
+//     "bvec" is a placeholder for one of bvec2, bvec3, or bvec4, "ivec"
+//     is a placeholder for one of ivec2, ivec3, or ivec4, and "vec" is
+//     a placeholder for vec2, vec3, or vec4.
+//         ...
+//     bvec greaterThan(vec x, vec y)
+//     bvec greaterThan(ivec x, ivec y)
+
+
+#version 110
+
+void main()
+{
+	bool result = greaterThan(0.0, 0.0);
+	gl_Position = vec4(0.0);
+}
diff --git a/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-greaterthanequal.vert b/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-greaterthanequal.vert
new file mode 100644
index 0000000..293341f
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-greaterthanequal.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+//
+// According to Section 8.6 of the GLSL 1.10 spec:
+//     For vector results, use the following built-in functions. Below,
+//     "bvec" is a placeholder for one of bvec2, bvec3, or bvec4, "ivec"
+//     is a placeholder for one of ivec2, ivec3, or ivec4, and "vec" is
+//     a placeholder for vec2, vec3, or vec4.
+//         ...
+//     bvec greaterThanEqual(vec x, vec y)
+//     bvec greaterThanEqual(ivec x, ivec y)
+
+
+#version 110
+
+void main()
+{
+	bool result = greaterThanEqual(0.0, 0.0);
+	gl_Position = vec4(0.0);
+}
diff --git a/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-lessthan.vert b/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-lessthan.vert
new file mode 100644
index 0000000..cb6a137
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-lessthan.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+//
+// According to Section 8.6 of the GLSL 1.10 spec:
+//     For vector results, use the following built-in functions. Below,
+//     "bvec" is a placeholder for one of bvec2, bvec3, or bvec4, "ivec"
+//     is a placeholder for one of ivec2, ivec3, or ivec4, and "vec" is
+//     a placeholder for vec2, vec3, or vec4.
+//         ...
+//     bvec lessThan(vec x, vec y)
+//     bvec lessThan(ivec x, ivec y)
+
+
+#version 110
+
+void main()
+{
+	bool result = lessThan(0.0, 0.0);
+	gl_Position = vec4(0.0);
+}
diff --git a/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-lessthanequal.vert b/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-lessthanequal.vert
new file mode 100644
index 0000000..9008f55
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-lessthanequal.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+//
+// According to Section 8.6 of the GLSL 1.10 spec:
+//     For vector results, use the following built-in functions. Below,
+//     "bvec" is a placeholder for one of bvec2, bvec3, or bvec4, "ivec"
+//     is a placeholder for one of ivec2, ivec3, or ivec4, and "vec" is
+//     a placeholder for vec2, vec3, or vec4.
+//         ...
+//     bvec lessThanEqual(vec x, vec y)
+//     bvec lessThanEqual(ivec x, ivec y)
+
+
+#version 110
+
+void main()
+{
+	bool result = lessThanEqual(0.0, 0.0);
+	gl_Position = vec4(0.0);
+}
diff --git a/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-notequal.vert b/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-notequal.vert
new file mode 100644
index 0000000..7d6243e
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/builtin-functions/scalar-notequal.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+//
+// According to Section 8.6 of the GLSL 1.10 spec:
+//     For vector results, use the following built-in functions. Below,
+//     "bvec" is a placeholder for one of bvec2, bvec3, or bvec4, "ivec"
+//     is a placeholder for one of ivec2, ivec3, or ivec4, and "vec" is
+//     a placeholder for vec2, vec3, or vec4.
+//         ...
+//     bvec notEqual(vec x, vec y)
+//     bvec notEqual(ivec x, ivec y)
+//     bvec notEqual(bvec x, bvec y)
+
+
+#version 110
+
+void main()
+{
+	bool result = notEqual(0.0, 0.0);
+	gl_Position = vec4(0.0);
+}
-- 
2.10.2



More information about the Piglit mailing list