[Piglit] [PATCH 2/4] GS: Test geometry input layout qualifier rules

Paul Berry stereotype441 at gmail.com
Mon Sep 30 13:46:37 PDT 2013


On 16 September 2013 09:35, Nicholas Mack <nichmack at gmail.com> wrote:

> ---
>  .../compiler/layout-in-only-input-qualifier.geom   | 23
> +++++++++++++++++++++
>  .../compiler/layout-in-only-one-qualifier-id.geom  | 24
> ++++++++++++++++++++++
>  2 files changed, 47 insertions(+)
>  create mode 100644
> tests/spec/glsl-1.50/compiler/layout-in-only-input-qualifier.geom
>  create mode 100644
> tests/spec/glsl-1.50/compiler/layout-in-only-one-qualifier-id.geom
>

> diff --git
> a/tests/spec/glsl-1.50/compiler/layout-in-only-input-qualifier.geom
> b/tests/spec/glsl-1.50/compiler/layout-in-only-input-qualifier.geom
> new file mode 100644
> index 0000000..74902bc
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/layout-in-only-input-qualifier.geom
> @@ -0,0 +1,23 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// check_link: true
> +// [end config]
> +//
> +// Section 4.3.8.1(Input Layout Qualifiers) of the GLSL 1.50 spec says:
> +// "Geometry shaders allow input layout qualifiers only on the interface
> +//  qualifier in, not on an input block, block member, or variable. The
> layout
> +//  qualifier identifiers for geometry shader inputs are
> +//     points
> +//     lines
> +//     lines_adjacency
> +//     triangles
> +//     triangles_adjacency"
> +
> +#version 150
> +
> +layout(line_strip) in;
>

Do we need this test?  It seems like patch 1/4 already verifies that
setting a geometry shader input layout of line_strip is disallowed.


> +
> +void main()
> +{
> +}
>

Since the config block specifies "check_link: true", we need a geometry
shader that would link successfully if it weren't for the error condition
you are trying to test (otherwise the test will pass for the wrong
reason).  So I believe we need to add something like
"layout(triangle_strip, max_vertices = 3) out;"


> diff --git
> a/tests/spec/glsl-1.50/compiler/layout-in-only-one-qualifier-id.geom
> b/tests/spec/glsl-1.50/compiler/layout-in-only-one-qualifier-id.geom
> new file mode 100644
> index 0000000..4edd840
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/layout-in-only-one-qualifier-id.geom
> @@ -0,0 +1,24 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// check_link: true
> +// [end config]
> +//
> +// Section 4.3.8.1(Input Layout Qualifiers) of the GLSL 1.50 spec says:
> +// "Geometry shaders allow input layout qualifiers only on the interface
> +//  qualifier in, not on an input block, block member, or variable. The
> layout
> +//  qualifier identifiers for geometry shader inputs are
> +//     points
> +//     lines
> +//     lines_adjacency
> +//     triangles
> +//     triangles_adjacency
> +//  Only one argument is accepted."
> +
> +#version 150
> +
> +layout(points, triangles_adjacency) in;
>

Similarly, here we should add something like "layout(triangle_strip,
max_vertices = 3) out;".


> +
> +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/20130930/1bd60706/attachment.html>


More information about the Piglit mailing list