diff mbox

glsl-1.50: check read only interfaces are read only

Message ID 1427461963-13703-1-git-send-email-t_arceri@yahoo.com.au
State New
Headers show

Commit Message

'Timothy Arceri' via Patchwork Forward March 27, 2015, 1:12 p.m. UTC
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
---
 .../compiler/interface-block-input-read-only.frag    | 20 ++++++++++++++++++++
 ...nterface-block-instance-name-input-read-only.frag | 20 ++++++++++++++++++++
 ...erface-block-instance-name-uniform-read-only.frag | 20 ++++++++++++++++++++
 .../compiler/interface-block-uniform-read-only.frag  | 20 ++++++++++++++++++++
 4 files changed, 80 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/compiler/interface-block-input-read-only.frag
 create mode 100644 tests/spec/glsl-1.50/compiler/interface-block-instance-name-input-read-only.frag
 create mode 100644 tests/spec/glsl-1.50/compiler/interface-block-instance-name-uniform-read-only.frag
 create mode 100644 tests/spec/glsl-1.50/compiler/interface-block-uniform-read-only.frag
diff mbox

Patch

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 0000000..304aacf
--- /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 0000000..d001db8
--- /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 0000000..43909ba
--- /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 0000000..aaea6b3
--- /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;
+}