[Piglit] [PATCH 2/2] glsl-3.30: Port the profile tests forward.

Kenneth Graunke kenneth at whitecape.org
Fri Aug 23 11:46:25 PDT 2013


These are the tests from glsl-1.50/compiler/profiles with the version
numbers changed.  It seemed worth testing for 3.30 as well.
---
 .../compiler/profiles/core-profile-default.vert          | 16 ++++++++++++++++
 .../glsl-3.30/compiler/profiles/core-profile-define.frag |  7 +++++++
 .../compiler/profiles/version-330-bad-profile.frag       |  7 +++++++
 .../compiler/profiles/version-330-core-profile.frag      |  7 +++++++
 .../compiler/profiles/version-330-es-profile.frag        |  7 +++++++
 5 files changed, 44 insertions(+)
 create mode 100644 tests/spec/glsl-3.30/compiler/profiles/core-profile-default.vert
 create mode 100644 tests/spec/glsl-3.30/compiler/profiles/core-profile-define.frag
 create mode 100644 tests/spec/glsl-3.30/compiler/profiles/version-330-bad-profile.frag
 create mode 100644 tests/spec/glsl-3.30/compiler/profiles/version-330-core-profile.frag
 create mode 100644 tests/spec/glsl-3.30/compiler/profiles/version-330-es-profile.frag

diff --git a/tests/spec/glsl-3.30/compiler/profiles/core-profile-default.vert b/tests/spec/glsl-3.30/compiler/profiles/core-profile-default.vert
new file mode 100644
index 0000000..4ba986f
--- /dev/null
+++ b/tests/spec/glsl-3.30/compiler/profiles/core-profile-default.vert
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.30
+// [end config]
+
+/* The GLSL 3.30 spec says
+ *   "If no profile argument is provided, the default is core."
+ */
+#version 330
+
+void main() {
+    /* gl_ClipVertex is deprecated and not available in GLSL 3.30 core, so
+     * it should cause a compilation error.
+     */
+    gl_Position = gl_ClipVertex;
+}
diff --git a/tests/spec/glsl-3.30/compiler/profiles/core-profile-define.frag b/tests/spec/glsl-3.30/compiler/profiles/core-profile-define.frag
new file mode 100644
index 0000000..bcb3842
--- /dev/null
+++ b/tests/spec/glsl-3.30/compiler/profiles/core-profile-define.frag
@@ -0,0 +1,7 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.30
+// [end config]
+
+#version 150
+int x = GL_core_profile;
diff --git a/tests/spec/glsl-3.30/compiler/profiles/version-330-bad-profile.frag b/tests/spec/glsl-3.30/compiler/profiles/version-330-bad-profile.frag
new file mode 100644
index 0000000..e6750b4
--- /dev/null
+++ b/tests/spec/glsl-3.30/compiler/profiles/version-330-bad-profile.frag
@@ -0,0 +1,7 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.30
+// [end config]
+
+#version 330 fhqwhgads
+void main() {}
diff --git a/tests/spec/glsl-3.30/compiler/profiles/version-330-core-profile.frag b/tests/spec/glsl-3.30/compiler/profiles/version-330-core-profile.frag
new file mode 100644
index 0000000..7e29d05
--- /dev/null
+++ b/tests/spec/glsl-3.30/compiler/profiles/version-330-core-profile.frag
@@ -0,0 +1,7 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.30
+// [end config]
+
+#version 330 core
+void main() {}
diff --git a/tests/spec/glsl-3.30/compiler/profiles/version-330-es-profile.frag b/tests/spec/glsl-3.30/compiler/profiles/version-330-es-profile.frag
new file mode 100644
index 0000000..b16751a
--- /dev/null
+++ b/tests/spec/glsl-3.30/compiler/profiles/version-330-es-profile.frag
@@ -0,0 +1,7 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.30
+// [end config]
+
+#version 330 es
+void main() {}
-- 
1.8.3.4



More information about the Piglit mailing list