[Piglit] [PATCH 3/4] GLSL 1.50: Test that layout qualifiers can only be declared in global scope

Paul Berry stereotype441 at gmail.com
Thu Aug 8 15:35:22 PDT 2013


On 6 August 2013 10:29, Nicholas Mack <nichmack at gmail.com> wrote:

> Two tests: vertex shader, fragment shader
>

I'd prefer to see this test exercise the layout qualifiers that are new to
GLSL 1.50 (namely the geometry shader input and output layout qualifiers)
because that's where we're likely to have bugs.

So for example, we might have a test to verify that trying to do
"layout(triangles) in;" inside a function results in a compile error, and a
similar test for "layout(triangles) out;".  Both of these  tests should be
".geom" files, since those constructs are only permitted in geometry
shaders.



> ---
>  tests/spec/glsl-1.50/compiler/layout-global-only.frag | 15 +++++++++++++++
>  tests/spec/glsl-1.50/compiler/layout-global-only.vert | 16
> ++++++++++++++++
>  2 files changed, 31 insertions(+)
>  create mode 100644 tests/spec/glsl-1.50/compiler/layout-global-only.frag
>  create mode 100644 tests/spec/glsl-1.50/compiler/layout-global-only.vert
>
> diff --git a/tests/spec/glsl-1.50/compiler/layout-global-only.frag
> b/tests/spec/glsl-1.50/compiler/layout-global-only.frag
> new file mode 100644
> index 0000000..84e9409
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/layout-global-only.frag
> @@ -0,0 +1,15 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// check_link: true
> +// [end config]
> +//
> +// Section 4.3.8(Layout Qualifiers) of the GLSL 1.50 spec says:
> +// "Declarations of layouts can only be made at global scope"
> +
> +#version 150
> +
> +void main()
> +{
> +       layout(pixel_center_integer) in vec4 gl_FragCoord;
> +}
> diff --git a/tests/spec/glsl-1.50/compiler/layout-global-only.vert
> b/tests/spec/glsl-1.50/compiler/layout-global-only.vert
> new file mode 100644
> index 0000000..e34a089
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/layout-global-only.vert
> @@ -0,0 +1,16 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// check_link: true
> +// [end config]
> +//
> +// Section 4.3.8(Layout Qualifiers) of the GLSL 1.50 spec says:
> +// "Declarations of layouts can only be made at global scope"
> +
> +#version 150
> +
> +void main()
> +{
> +       layout(pixel_center_origin) in vec4 b;
> +       gl_Position = b;
> +}
> --
> 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/20130808/2c3037dc/attachment-0001.html>


More information about the Piglit mailing list