[Piglit] [PATCH] GLSL: Test that input layout qualifiers cannot be used on variable declarations

Paul Berry stereotype441 at gmail.com
Tue Oct 8 00:11:59 CEST 2013


On 20 September 2013 12:31, Nicholas Mack <nichmack at gmail.com> wrote:

> ---
>  ...-layout-qualifiers-with-variable-declarations.geom | 19
> +++++++++++++++++++
>  ...-layout-qualifiers-with-variable-declarations.geom | 19
> +++++++++++++++++++
>  2 files changed, 38 insertions(+)
>  create mode 100644
> tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
>  create mode 100644
> tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
>
> diff --git
> a/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
> b/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
> new file mode 100644
> index 0000000..f26b60d
> --- /dev/null
> +++
> b/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
> @@ -0,0 +1,19 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// check_link: true
>

This needs to be "check_link: false".  Otherwise the test will erroneously
pass due to lacking the necessary input/output layout qualifiers.

A similar change needs to be made to
incorrect-out-layout-qualifiers-with-variable-declarations.geom.

With that change, this patch is:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>


> +// [end config]
> +//
> +// Tests that input layout qualifiers cannot be used on a variable
> declaration.
> +//
> +// GLSLangSpec 1.50, section 4.3.8.2 (Output Layout Qualifiers):
> +// "Geometry shaders allow input layout qualifiers only on the interface
> +//  qualifier in, not on an input block,block member, or variable."
> +
> +#version 150
> +
> +layout(points) in float c[];
> +
> +void main()
> +{
> +}
> diff --git
> a/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
> b/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
> new file mode 100644
> index 0000000..161de1c
> --- /dev/null
> +++
> b/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
> @@ -0,0 +1,19 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// check_link: true
> +// [end config]
> +//
> +// Tests that output layout qualifiers cannot be used on a variable
> declaration.
> +//
> +// GLSLangSpec 1.50, section 4.3.8.2 (Output Layout Qualifiers):
> +// "Geometry shaders can have output layout qualifiers only on the
> interface
> +//  qualifier out, not on an output block or variable declaration."
> +
> +#version 150
> +
> +layout(points) out float c;
> +
> +void main()
> +{
> +}
> --
> 1.8.3.1
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20131007/5e78b465/attachment.html>


More information about the Piglit mailing list