[Piglit] [PATCH 2/2] glsl-1.30: Add tests for signed-to-unsigned implicit conversion and vice-versa
Ian Romanick
idr at freedesktop.org
Tue Apr 19 13:10:35 PDT 2011
From: Ian Romanick <ian.d.romanick at intel.com>
---
.../assign-implicit-conversion-int-uint.vert | 19 +++++++++++++++++++
.../assign-implicit-conversion-ivec2-uvec2.vert | 19 +++++++++++++++++++
.../assign-implicit-conversion-ivec3-uvec3.vert | 19 +++++++++++++++++++
.../assign-implicit-conversion-ivec4-uvec4.vert | 19 +++++++++++++++++++
.../assign-implicit-conversion-uint-int.vert | 19 +++++++++++++++++++
.../assign-implicit-conversion-uvec2-ivec2.vert | 19 +++++++++++++++++++
.../assign-implicit-conversion-uvec3-ivec3.vert | 19 +++++++++++++++++++
.../assign-implicit-conversion-uvec4-ivec4.vert | 19 +++++++++++++++++++
8 files changed, 152 insertions(+), 0 deletions(-)
create mode 100644 tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-int-uint.vert
create mode 100644 tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-ivec2-uvec2.vert
create mode 100644 tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-ivec3-uvec3.vert
create mode 100644 tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-ivec4-uvec4.vert
create mode 100644 tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uint-int.vert
create mode 100644 tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uvec2-ivec2.vert
create mode 100644 tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uvec3-ivec3.vert
create mode 100644 tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uvec4-ivec4.vert
diff --git a/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-int-uint.vert b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-int-uint.vert
new file mode 100644
index 0000000..6bc185c
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-int-uint.vert
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.30
+ * [end config]
+ *
+ * From page 27 (page 33 of the PDF) of the GLSL 1.30 spec:
+ *
+ * "There are no implicit conversions between signed and unsigned
+ * integers."
+ */
+#version 130
+
+void main()
+{
+ uint x = 5u;
+ int y = x;
+
+ gl_Position = vec4(x, y, x, y);
+}
diff --git a/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-ivec2-uvec2.vert b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-ivec2-uvec2.vert
new file mode 100644
index 0000000..0af32ba
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-ivec2-uvec2.vert
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.30
+ * [end config]
+ *
+ * From page 27 (page 33 of the PDF) of the GLSL 1.30 spec:
+ *
+ * "There are no implicit conversions between signed and unsigned
+ * integers."
+ */
+#version 130
+
+void main()
+{
+ uvec2 x = uvec2(5);
+ ivec2 y = x;
+
+ gl_Position = vec4(x.xy, y.xy);
+}
diff --git a/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-ivec3-uvec3.vert b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-ivec3-uvec3.vert
new file mode 100644
index 0000000..de12f19
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-ivec3-uvec3.vert
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.30
+ * [end config]
+ *
+ * From page 27 (page 33 of the PDF) of the GLSL 1.30 spec:
+ *
+ * "There are no implicit conversions between signed and unsigned
+ * integers."
+ */
+#version 130
+
+void main()
+{
+ uvec3 x = uvec4(5);
+ ivec3 y = x;
+
+ gl_Position = vec4(x.xy, y.xy);
+}
diff --git a/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-ivec4-uvec4.vert b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-ivec4-uvec4.vert
new file mode 100644
index 0000000..0a2515c
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-ivec4-uvec4.vert
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.30
+ * [end config]
+ *
+ * From page 27 (page 33 of the PDF) of the GLSL 1.30 spec:
+ *
+ * "There are no implicit conversions between signed and unsigned
+ * integers."
+ */
+#version 130
+
+void main()
+{
+ uvec4 x = uvec4(5);
+ ivec4 y = x;
+
+ gl_Position = vec4(y);
+}
diff --git a/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uint-int.vert b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uint-int.vert
new file mode 100644
index 0000000..24ee4d7
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uint-int.vert
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.30
+ * [end config]
+ *
+ * From page 27 (page 33 of the PDF) of the GLSL 1.30 spec:
+ *
+ * "There are no implicit conversions between signed and unsigned
+ * integers."
+ */
+#version 130
+
+void main()
+{
+ int x = 5;
+ uint y = x;
+
+ gl_Position = vec4(x, y, x, y);
+}
diff --git a/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uvec2-ivec2.vert b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uvec2-ivec2.vert
new file mode 100644
index 0000000..f2ae3e8
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uvec2-ivec2.vert
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.30
+ * [end config]
+ *
+ * From page 27 (page 33 of the PDF) of the GLSL 1.30 spec:
+ *
+ * "There are no implicit conversions between signed and unsigned
+ * integers."
+ */
+#version 130
+
+void main()
+{
+ ivec2 x = ivec2(5);
+ uvec2 y = x;
+
+ gl_Position = vec4(x.xy, y.xy);
+}
diff --git a/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uvec3-ivec3.vert b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uvec3-ivec3.vert
new file mode 100644
index 0000000..67f344e
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uvec3-ivec3.vert
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.30
+ * [end config]
+ *
+ * From page 27 (page 33 of the PDF) of the GLSL 1.30 spec:
+ *
+ * "There are no implicit conversions between signed and unsigned
+ * integers."
+ */
+#version 130
+
+void main()
+{
+ ivec3 x = ivec4(5);
+ uvec3 y = x;
+
+ gl_Position = vec4(x.xy, y.xy);
+}
diff --git a/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uvec4-ivec4.vert b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uvec4-ivec4.vert
new file mode 100644
index 0000000..2a026c0
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/basic-types/assign-implicit-conversion-uvec4-ivec4.vert
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.30
+ * [end config]
+ *
+ * From page 27 (page 33 of the PDF) of the GLSL 1.30 spec:
+ *
+ * "There are no implicit conversions between signed and unsigned
+ * integers."
+ */
+#version 130
+
+void main()
+{
+ ivec4 x = ivec4(5);
+ uvec4 y = x;
+
+ gl_Position = vec4(y);
+}
--
1.7.4
More information about the Piglit
mailing list