[Piglit] [PATCH] glsl-1.50: check read only interfaces are read only

Anuj Phogat anuj.phogat at gmail.com
Fri Mar 27 08:05:23 PDT 2015


On Fri, Mar 27, 2015 at 6:12 AM, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> 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 --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;
> +}
> --
> 2.1.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit

LGTM.
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the Piglit mailing list