[Piglit] [PATCH 2/4] glsl: Add new __VERSION__ tests for GLSL 1.10-1.40 and ES 1.00/3.00.
Kenneth Graunke
kenneth at whitecape.org
Wed Aug 28 12:43:33 PDT 2013
These follow the pattern of the 1.50 and 3.30 tests.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
tests/spec/glsl-1.10/compiler/version-macro.frag | 14 ++++++++++++++
tests/spec/glsl-1.20/compiler/version-macro.frag | 14 ++++++++++++++
tests/spec/glsl-1.30/compiler/version-macro.frag | 14 ++++++++++++++
tests/spec/glsl-1.40/compiler/version-macro.frag | 14 ++++++++++++++
tests/spec/glsl-es-1.00/compiler/version-macro.frag | 14 ++++++++++++++
tests/spec/glsl-es-3.00/compiler/version-macro.frag | 14 ++++++++++++++
6 files changed, 84 insertions(+)
create mode 100644 tests/spec/glsl-1.10/compiler/version-macro.frag
create mode 100644 tests/spec/glsl-1.20/compiler/version-macro.frag
create mode 100644 tests/spec/glsl-1.30/compiler/version-macro.frag
create mode 100644 tests/spec/glsl-1.40/compiler/version-macro.frag
create mode 100644 tests/spec/glsl-es-1.00/compiler/version-macro.frag
create mode 100644 tests/spec/glsl-es-3.00/compiler/version-macro.frag
diff --git a/tests/spec/glsl-1.10/compiler/version-macro.frag b/tests/spec/glsl-1.10/compiler/version-macro.frag
new file mode 100644
index 0000000..b005998
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/version-macro.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// [end config]
+
+#version 110
+#if !defined __VERSION__
+#error __VERSION__ not defined.
+#endif
+#if __VERSION__ != 110
+#error __VERSION__ is not 110
+#endif
+
+void main() { }
diff --git a/tests/spec/glsl-1.20/compiler/version-macro.frag b/tests/spec/glsl-1.20/compiler/version-macro.frag
new file mode 100644
index 0000000..7157581
--- /dev/null
+++ b/tests/spec/glsl-1.20/compiler/version-macro.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.20
+// [end config]
+
+#version 120
+#if !defined __VERSION__
+#error __VERSION__ not defined.
+#endif
+#if __VERSION__ != 120
+#error __VERSION__ is not 120
+#endif
+
+void main() { }
diff --git a/tests/spec/glsl-1.30/compiler/version-macro.frag b/tests/spec/glsl-1.30/compiler/version-macro.frag
new file mode 100644
index 0000000..04727a1
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/version-macro.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.30
+// [end config]
+
+#version 130
+#if !defined __VERSION__
+#error __VERSION__ not defined.
+#endif
+#if __VERSION__ != 130
+#error __VERSION__ is not 130
+#endif
+
+void main() { }
diff --git a/tests/spec/glsl-1.40/compiler/version-macro.frag b/tests/spec/glsl-1.40/compiler/version-macro.frag
new file mode 100644
index 0000000..e6a72aa
--- /dev/null
+++ b/tests/spec/glsl-1.40/compiler/version-macro.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// [end config]
+
+#version 140
+#if !defined __VERSION__
+#error __VERSION__ not defined.
+#endif
+#if __VERSION__ != 140
+#error __VERSION__ is not 140
+#endif
+
+void main() { }
diff --git a/tests/spec/glsl-es-1.00/compiler/version-macro.frag b/tests/spec/glsl-es-1.00/compiler/version-macro.frag
new file mode 100644
index 0000000..df97b85
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/version-macro.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+// [end config]
+
+#version 100
+#if !defined __VERSION__
+#error __VERSION__ not defined.
+#endif
+#if __VERSION__ != 100
+#error __VERSION__ is not 100
+#endif
+
+void main() { }
diff --git a/tests/spec/glsl-es-3.00/compiler/version-macro.frag b/tests/spec/glsl-es-3.00/compiler/version-macro.frag
new file mode 100644
index 0000000..6dc095e
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/version-macro.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.00
+// [end config]
+
+#version 300 es
+#if !defined __VERSION__
+#error __VERSION__ not defined.
+#endif
+#if __VERSION__ != 300
+#error __VERSION__ is not 300
+#endif
+
+void main() { }
--
1.8.3.4
More information about the Piglit
mailing list