[Piglit] [PATCH 02/14] Test illegal usages of "gl_" prefix in interface blocks.
Paul Berry
stereotype441 at gmail.com
Wed Oct 2 16:45:30 PDT 2013
---
.../interface-block-array-elem-uses-gl-prefix.vert | 24 ++++++++++++++++++++++
...terface-block-instance-name-uses-gl-prefix.vert | 23 +++++++++++++++++++++
.../interface-block-name-uses-gl-prefix.vert | 23 +++++++++++++++++++++
.../named-interface-block-elem-uses-gl-prefix.vert | 24 ++++++++++++++++++++++
...nnamed-interface-block-elem-uses-gl-prefix.vert | 24 ++++++++++++++++++++++
5 files changed, 118 insertions(+)
create mode 100644 tests/spec/glsl-1.50/compiler/interface-block-array-elem-uses-gl-prefix.vert
create mode 100644 tests/spec/glsl-1.50/compiler/interface-block-instance-name-uses-gl-prefix.vert
create mode 100644 tests/spec/glsl-1.50/compiler/interface-block-name-uses-gl-prefix.vert
create mode 100644 tests/spec/glsl-1.50/compiler/named-interface-block-elem-uses-gl-prefix.vert
create mode 100644 tests/spec/glsl-1.50/compiler/unnamed-interface-block-elem-uses-gl-prefix.vert
diff --git a/tests/spec/glsl-1.50/compiler/interface-block-array-elem-uses-gl-prefix.vert b/tests/spec/glsl-1.50/compiler/interface-block-array-elem-uses-gl-prefix.vert
new file mode 100644
index 0000000..20d5a06
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/interface-block-array-elem-uses-gl-prefix.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// From section 3.7 (Identifiers) of the GLSL 1.50 spec:
+//
+// Identifiers starting with "gl_" are reserved for use by OpenGL
+// and may not be declared in a shader as either a variable or a
+// function.
+//
+// Consequently, an interface block array may not contain a name
+// starting with "gl_".
+
+#version 150
+
+out block {
+ vec4 gl_ProsciuttoHoagie;
+} inst[2];
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/interface-block-instance-name-uses-gl-prefix.vert b/tests/spec/glsl-1.50/compiler/interface-block-instance-name-uses-gl-prefix.vert
new file mode 100644
index 0000000..830ca05
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/interface-block-instance-name-uses-gl-prefix.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// From section 3.7 (Identifiers) of the GLSL 1.50 spec:
+//
+// Identifiers starting with "gl_" are reserved for use by OpenGL
+// and may not be declared in a shader as either a variable or a
+// function.
+//
+// Consequently, an interface block's instance name may not start with "gl_".
+
+#version 150
+
+out block {
+ vec4 a;
+} gl_ProsciuttoHoagie;
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/interface-block-name-uses-gl-prefix.vert b/tests/spec/glsl-1.50/compiler/interface-block-name-uses-gl-prefix.vert
new file mode 100644
index 0000000..ed811c0
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/interface-block-name-uses-gl-prefix.vert
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// From section 3.7 (Identifiers) of the GLSL 1.50 spec:
+//
+// Identifiers starting with "gl_" are reserved for use by OpenGL
+// and may not be declared in a shader as either a variable or a
+// function.
+//
+// Consequently, an interface block's block name may not start with "gl_".
+
+#version 150
+
+out gl_ProsciuttoHoagie {
+ vec4 a;
+} inst;
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/named-interface-block-elem-uses-gl-prefix.vert b/tests/spec/glsl-1.50/compiler/named-interface-block-elem-uses-gl-prefix.vert
new file mode 100644
index 0000000..94e85ff
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/named-interface-block-elem-uses-gl-prefix.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// From section 3.7 (Identifiers) of the GLSL 1.50 spec:
+//
+// Identifiers starting with "gl_" are reserved for use by OpenGL
+// and may not be declared in a shader as either a variable or a
+// function.
+//
+// Consequently, a named interface block may not contain a name
+// starting with "gl_".
+
+#version 150
+
+out block {
+ vec4 gl_ProsciuttoHoagie;
+} inst;
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/unnamed-interface-block-elem-uses-gl-prefix.vert b/tests/spec/glsl-1.50/compiler/unnamed-interface-block-elem-uses-gl-prefix.vert
new file mode 100644
index 0000000..31e90ac
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/unnamed-interface-block-elem-uses-gl-prefix.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// From section 3.7 (Identifiers) of the GLSL 1.50 spec:
+//
+// Identifiers starting with "gl_" are reserved for use by OpenGL
+// and may not be declared in a shader as either a variable or a
+// function.
+//
+// Consequently, an unnamed interface block may not contain a name
+// starting with "gl_".
+
+#version 150
+
+out block {
+ vec4 gl_ProsciuttoHoagie;
+};
+
+void main()
+{
+}
--
1.8.4
More information about the Piglit
mailing list