diff options
author | Timothy Arceri <t_arceri@yahoo.com.au> | 2015-03-27 23:36:54 +1100 |
---|---|---|
committer | Timothy Arceri <t_arceri@yahoo.com.au> | 2015-03-28 10:09:17 +1100 |
commit | b459cfe3b3857e5f70b010334fb76728fecc2a5b (patch) | |
tree | 1fba5e49fee9cd53b76245dbad7da018d396829d | |
parent | aa97ac98dd8f1eab8f288f9509fdf3f91ffbecd6 (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>
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; +} |