[Piglit] [PATCH] glsl: Verify that #version 0 generates an error instead of crashing
Ian Romanick
idr at freedesktop.org
Wed Aug 24 19:32:15 UTC 2016
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97420
---
tests/spec/glsl-1.10/compiler/version-0.frag | 8 ++++++++
tests/spec/glsl-1.10/compiler/version-0.vert | 8 ++++++++
tests/spec/glsl-es-3.00/compiler/version-0.frag | 8 ++++++++
tests/spec/glsl-es-3.00/compiler/version-0.vert | 8 ++++++++
4 files changed, 32 insertions(+)
create mode 100644 tests/spec/glsl-1.10/compiler/version-0.frag
create mode 100644 tests/spec/glsl-1.10/compiler/version-0.vert
create mode 100644 tests/spec/glsl-es-3.00/compiler/version-0.frag
create mode 100644 tests/spec/glsl-es-3.00/compiler/version-0.vert
diff --git a/tests/spec/glsl-1.10/compiler/version-0.frag b/tests/spec/glsl-1.10/compiler/version-0.frag
new file mode 100644
index 0000000..bed4793
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/version-0.frag
@@ -0,0 +1,8 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+
+#version 0
+
+void main() { gl_FragColor = vec4(0); }
\ No newline at end of file
diff --git a/tests/spec/glsl-1.10/compiler/version-0.vert b/tests/spec/glsl-1.10/compiler/version-0.vert
new file mode 100644
index 0000000..342df76
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/version-0.vert
@@ -0,0 +1,8 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+
+#version 0
+
+void main() { gl_Position = vec4(0); }
\ No newline at end of file
diff --git a/tests/spec/glsl-es-3.00/compiler/version-0.frag b/tests/spec/glsl-es-3.00/compiler/version-0.frag
new file mode 100644
index 0000000..126dcab
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/version-0.frag
@@ -0,0 +1,8 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.00
+// [end config]
+
+#version 0 es
+
+void main() { }
diff --git a/tests/spec/glsl-es-3.00/compiler/version-0.vert b/tests/spec/glsl-es-3.00/compiler/version-0.vert
new file mode 100644
index 0000000..1383fe3
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/version-0.vert
@@ -0,0 +1,8 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.00
+// [end config]
+
+#version 0 es
+
+void main() { gl_Position = vec4(0); }
--
2.5.5
More information about the Piglit
mailing list