[Piglit] [PATCH] glsl: Add tests for large version that could be interpreted as -1

Ian Romanick idr at freedesktop.org
Tue Nov 8 19:28:15 UTC 2016


From: Ian Romanick <ian.d.romanick at intel.com>

One of the possible fixes to bug #97420 was to use -1 (instead of 0) as
the "version not set" flag.  I believe that would have failed these tests.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97420
Cc: Juan A. Suarez Romero <jasuarez at igalia.com>
Cc: Karol Herbst <karolherbst at gmail.com>
---
 tests/spec/glsl-1.10/compiler/version-18446744073709551615.frag  | 9 +++++++++
 tests/spec/glsl-1.10/compiler/version-18446744073709551615.vert  | 9 +++++++++
 tests/spec/glsl-1.10/compiler/version-4294967295.frag            | 9 +++++++++
 tests/spec/glsl-1.10/compiler/version-4294967295.vert            | 9 +++++++++
 .../spec/glsl-es-3.00/compiler/version-18446744073709551615.frag | 9 +++++++++
 .../spec/glsl-es-3.00/compiler/version-18446744073709551615.vert | 9 +++++++++
 tests/spec/glsl-es-3.00/compiler/version-4294967295.frag         | 9 +++++++++
 tests/spec/glsl-es-3.00/compiler/version-4294967295.vert         | 9 +++++++++
 8 files changed, 72 insertions(+)
 create mode 100644 tests/spec/glsl-1.10/compiler/version-18446744073709551615.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/version-18446744073709551615.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/version-4294967295.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/version-4294967295.vert
 create mode 100644 tests/spec/glsl-es-3.00/compiler/version-18446744073709551615.frag
 create mode 100644 tests/spec/glsl-es-3.00/compiler/version-18446744073709551615.vert
 create mode 100644 tests/spec/glsl-es-3.00/compiler/version-4294967295.frag
 create mode 100644 tests/spec/glsl-es-3.00/compiler/version-4294967295.vert

diff --git a/tests/spec/glsl-1.10/compiler/version-18446744073709551615.frag b/tests/spec/glsl-1.10/compiler/version-18446744073709551615.frag
new file mode 100644
index 0000000..32291a4
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/version-18446744073709551615.frag
@@ -0,0 +1,9 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+
+// As a 64-bit integer, this is -1
+#version 18446744073709551615
+
+void main() { gl_FragColor = vec4(0); }
diff --git a/tests/spec/glsl-1.10/compiler/version-18446744073709551615.vert b/tests/spec/glsl-1.10/compiler/version-18446744073709551615.vert
new file mode 100644
index 0000000..a75e51f
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/version-18446744073709551615.vert
@@ -0,0 +1,9 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+
+// As a 64-bit integer, this is -1
+#version 18446744073709551615
+
+void main() { gl_Position = vec4(0); }
diff --git a/tests/spec/glsl-1.10/compiler/version-4294967295.frag b/tests/spec/glsl-1.10/compiler/version-4294967295.frag
new file mode 100644
index 0000000..20d234a
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/version-4294967295.frag
@@ -0,0 +1,9 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+
+// As a 32-bit integer, this is -1
+#version 4294967295
+
+void main() { gl_FragColor = vec4(0); }
diff --git a/tests/spec/glsl-1.10/compiler/version-4294967295.vert b/tests/spec/glsl-1.10/compiler/version-4294967295.vert
new file mode 100644
index 0000000..2c831fa
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/version-4294967295.vert
@@ -0,0 +1,9 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+
+// As a 32-bit integer, this is -1
+#version 4294967295
+
+void main() { gl_Position = vec4(0); }
diff --git a/tests/spec/glsl-es-3.00/compiler/version-18446744073709551615.frag b/tests/spec/glsl-es-3.00/compiler/version-18446744073709551615.frag
new file mode 100644
index 0000000..f20332b
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/version-18446744073709551615.frag
@@ -0,0 +1,9 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.00
+// [end config]
+
+// As a 64-bit integer, this is -1
+#version 18446744073709551615 es
+
+void main() { gl_FragColor = vec4(0); }
diff --git a/tests/spec/glsl-es-3.00/compiler/version-18446744073709551615.vert b/tests/spec/glsl-es-3.00/compiler/version-18446744073709551615.vert
new file mode 100644
index 0000000..2721bc5
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/version-18446744073709551615.vert
@@ -0,0 +1,9 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.00
+// [end config]
+
+// As a 64-bit integer, this is -1
+#version 18446744073709551615 es
+
+void main() { gl_Position = vec4(0); }
diff --git a/tests/spec/glsl-es-3.00/compiler/version-4294967295.frag b/tests/spec/glsl-es-3.00/compiler/version-4294967295.frag
new file mode 100644
index 0000000..c7ae1bf
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/version-4294967295.frag
@@ -0,0 +1,9 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.00
+// [end config]
+
+// As a 32-bit integer, this is -1
+#version 4294967295 es
+
+void main() { gl_FragColor = vec4(0); }
diff --git a/tests/spec/glsl-es-3.00/compiler/version-4294967295.vert b/tests/spec/glsl-es-3.00/compiler/version-4294967295.vert
new file mode 100644
index 0000000..255a686
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/version-4294967295.vert
@@ -0,0 +1,9 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.00
+// [end config]
+
+// As a 32-bit integer, this is -1
+#version 4294967295 ese
+
+void main() { gl_Position = vec4(0); }
-- 
2.5.5



More information about the Piglit mailing list