summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Arceri <t_arceri@yahoo.com.au>2015-03-27 23:36:54 +1100
committerTimothy Arceri <t_arceri@yahoo.com.au>2015-03-28 10:09:17 +1100
commitb459cfe3b3857e5f70b010334fb76728fecc2a5b (patch)
tree1fba5e49fee9cd53b76245dbad7da018d396829d
parentaa97ac98dd8f1eab8f288f9509fdf3f91ffbecd6 (diff)
glsl-1.50: check read only interfaces are read only
Test results: AMD Radeon HD 6670 - Catalyst 14.501.1003 OpenGL 4.4 interface-block-instance-name-input-read-only.frag - pass interface-block-input-read-only.frag - pass interface-block-instance-name-uniform-read-only.frag - fail interface-block-uniform-read-only.frag - fail Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Mark Janes <mark.a.janes@intel.com>
-rw-r--r--tests/spec/glsl-1.50/compiler/interface-block-input-read-only.frag20
-rw-r--r--tests/spec/glsl-1.50/compiler/interface-block-instance-name-input-read-only.frag20
-rw-r--r--tests/spec/glsl-1.50/compiler/interface-block-instance-name-uniform-read-only.frag20
-rw-r--r--tests/spec/glsl-1.50/compiler/interface-block-uniform-read-only.frag20
4 files changed, 80 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.50/compiler/interface-block-input-read-only.frag b/tests/spec/glsl-1.50/compiler/interface-block-input-read-only.frag
new file mode 100644
index 000000000..304aacfe0
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/interface-block-input-read-only.frag
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: false
+// [end config]
+//
+// Check that an error is generated when trying
+// to change the value of a shader input.
+
+#version 150
+
+in Block {
+ vec4 invar;
+};
+
+void main()
+{
+ invar = vec4(1.0);
+ gl_FragColor = invar;
+}
diff --git a/tests/spec/glsl-1.50/compiler/interface-block-instance-name-input-read-only.frag b/tests/spec/glsl-1.50/compiler/interface-block-instance-name-input-read-only.frag
new file mode 100644
index 000000000..d001db852
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/interface-block-instance-name-input-read-only.frag
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: false
+// [end config]
+//
+// Check that an error is generated when trying
+// to change the value of a shader input.
+
+#version 150
+
+in Block {
+ vec4 invar;
+} a;
+
+void main()
+{
+ a.invar = vec4(1.0);
+ gl_FragColor = a.invar;
+}
diff --git a/tests/spec/glsl-1.50/compiler/interface-block-instance-name-uniform-read-only.frag b/tests/spec/glsl-1.50/compiler/interface-block-instance-name-uniform-read-only.frag
new file mode 100644
index 000000000..5b4875c48
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/interface-block-instance-name-uniform-read-only.frag
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: false
+// [end config]
+//
+// Check that an error is generated when trying
+// to change the value of a uniform.
+
+#version 150
+
+uniform Block {
+ vec4 invar;
+} a;
+
+void main()
+{
+ a.invar = vec4(1.0);
+ gl_FragColor = a.invar;
+}
diff --git a/tests/spec/glsl-1.50/compiler/interface-block-uniform-read-only.frag b/tests/spec/glsl-1.50/compiler/interface-block-uniform-read-only.frag
new file mode 100644
index 000000000..1b52e2027
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/interface-block-uniform-read-only.frag
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: false
+// [end config]
+//
+// Check that an error is generated when trying
+// to change the value of a uniform.
+
+#version 150
+
+uniform Block {
+ vec4 invar;
+};
+
+void main()
+{
+ invar = vec4(1.0);
+ gl_FragColor = invar;
+}