[Piglit] [PATCH] glsl-1.30: Check that qualifiers other than precision qualifiers are rejected

Matt Turner mattst88 at gmail.com
Fri Aug 30 15:26:33 PDT 2013


On Fri, Aug 30, 2013 at 2:02 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> I'm adding these tests because the way I intend to fix the Mesa
> regression of precision qualifiers on struct members could also allow
> other qualifiers.  I don't want to replace one unnoticed regression with
> another. :)
>
>  .../storage-qualifiers/struct-member-centroid.frag      | 17 +++++++++++++++++
>  .../storage-qualifiers/struct-member-const.frag         | 17 +++++++++++++++++
>  .../compiler/storage-qualifiers/struct-member-in.frag   | 17 +++++++++++++++++
>  .../storage-qualifiers/struct-member-noperspective.frag | 17 +++++++++++++++++
>  .../compiler/storage-qualifiers/struct-member-out.frag  | 17 +++++++++++++++++
>  .../storage-qualifiers/struct-member-smooth.frag        | 17 +++++++++++++++++
>  .../storage-qualifiers/struct-member-uniform.frag       | 17 +++++++++++++++++
>  .../storage-qualifiers/struct-member-varying.frag       | 17 +++++++++++++++++
>  8 files changed, 136 insertions(+)
>  create mode 100644 tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-centroid.frag
>  create mode 100644 tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-const.frag
>  create mode 100644 tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-in.frag
>  create mode 100644 tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-noperspective.frag
>  create mode 100644 tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-out.frag
>  create mode 100644 tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-smooth.frag
>  create mode 100644 tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-uniform.frag
>  create mode 100644 tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-varying.frag
>
> diff --git a/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-centroid.frag b/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-centroid.frag
> new file mode 100644
> index 0000000..bb76dcd
> --- /dev/null
> +++ b/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-centroid.frag
> @@ -0,0 +1,17 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.30
> +// [end config]
> +//
> +// Section 4.1.8 (Structures) of the GLSL 1.30 spec says:
> +//
> +//     "Member declarators may contain precision qualifiers, but may not
> +//     contain any other qualifiers."
> +
> +#version 130
> +
> +struct s {
> +       centroid float a;
> +};
> +
> +void main() { gl_FragColor = vec4(0); }
> diff --git a/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-const.frag b/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-const.frag
> new file mode 100644
> index 0000000..4d9b1ab
> --- /dev/null
> +++ b/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-const.frag
> @@ -0,0 +1,17 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.30
> +// [end config]
> +//
> +// Section 4.1.8 (Structures) of the GLSL 1.30 spec says:
> +//
> +//     "Member declarators may contain precision qualifiers, but may not
> +//     contain any other qualifiers."
> +
> +#version 130
> +
> +struct s {
> +       const float a;
> +};
> +
> +void main() { gl_FragColor = vec4(0); }
> diff --git a/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-in.frag b/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-in.frag
> new file mode 100644
> index 0000000..f9a6186
> --- /dev/null
> +++ b/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-in.frag
> @@ -0,0 +1,17 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.30
> +// [end config]
> +//
> +// Section 4.1.8 (Structures) of the GLSL 1.30 spec says:
> +//
> +//     "Member declarators may contain precision qualifiers, but may not
> +//     contain any other qualifiers."
> +
> +#version 130
> +
> +struct s {
> +       in float a;
> +};
> +
> +void main() { gl_FragColor = vec4(0); }
> diff --git a/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-noperspective.frag b/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-noperspective.frag
> new file mode 100644
> index 0000000..14ef6f7
> --- /dev/null
> +++ b/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-noperspective.frag
> @@ -0,0 +1,17 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.30
> +// [end config]
> +//
> +// Section 4.1.8 (Structures) of the GLSL 1.30 spec says:
> +//
> +//     "Member declarators may contain precision qualifiers, but may not
> +//     contain any other qualifiers."
> +
> +#version 130
> +
> +struct s {
> +       noperspective float a;
> +};
> +
> +void main() { gl_FragColor = vec4(0); }
> diff --git a/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-out.frag b/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-out.frag
> new file mode 100644
> index 0000000..f3c1bb0
> --- /dev/null
> +++ b/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-out.frag
> @@ -0,0 +1,17 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.30
> +// [end config]
> +//
> +// Section 4.1.8 (Structures) of the GLSL 1.30 spec says:
> +//
> +//     "Member declarators may contain precision qualifiers, but may not
> +//     contain any other qualifiers."
> +
> +#version 130
> +
> +struct s {
> +       out float a;
> +};
> +
> +void main() { gl_FragColor = vec4(0); }
> diff --git a/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-smooth.frag b/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-smooth.frag
> new file mode 100644
> index 0000000..05b8cd2
> --- /dev/null
> +++ b/tests/spec/glsl-1.30/compiler/storage-qualifiers/struct-member-smooth.frag
> @@ -0,0 +1,17 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.30
> +// [end config]
> +//
> +// Section 4.1.8 (Structures) of the GLSL 1.30 spec says:
> +//
> +//     "Member declarators may contain precision qualifiers, but may not
> +//     contain any other qualifiers."
> +
> +#version 130
> +
> +struct s {
> +       smoot float a;

smooth.

With that fixed: Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the Piglit mailing list