[Piglit] [PATCH 8/8] gs: Verify that an error is generated if no input layout is specified.
Anuj Phogat
anuj.phogat at gmail.com
Thu Aug 15 12:29:49 PDT 2013
On Mon, Aug 12, 2013 at 3:03 PM, Paul Berry <stereotype441 at gmail.com> wrote:
> ---
> ...put-sizing-no-input-layout-declared.shader_test | 61 ++++++++++++++++++++++
> 1 file changed, 61 insertions(+)
> create mode 100644 tests/spec/glsl-1.50/linker/gs-input-sizing-no-input-layout-declared.shader_test
>
> diff --git a/tests/spec/glsl-1.50/linker/gs-input-sizing-no-input-layout-declared.shader_test b/tests/spec/glsl-1.50/linker/gs-input-sizing-no-input-layout-declared.shader_test
> new file mode 100644
> index 0000000..f04107d
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/linker/gs-input-sizing-no-input-layout-declared.shader_test
> @@ -0,0 +1,61 @@
> +# Section 4.3.8.1 (Input Layout Qualifiers) of the GLSL 1.50 spec says:
> +#
> +# At least one geometry shader (compilation unit) in a program must
> +# declare an input layout, and all geometry shader input layout
> +# declarations in a program must declare the same layout. It is not
> +# required that all geometry shaders in a program declare an input
> +# layout.
> +#
> +# This test verifies that a link error occurs if no compilation unit
> +# declares an input layout.
> +
> +[require]
> +GLSL >= 1.50
> +
> +[vertex shader]
> +#version 150
> +
> +in vec4 vertex;
> +out vec4 vertex_to_gs;
> +
> +void main()
> +{
> + vertex_to_gs = vertex;
> +}
> +
> +[geometry shader]
> +#version 150
> +
> +layout(triangle_strip, max_vertices = 3) out;
> +
> +void do_vertex(int i);
> +
> +void main()
> +{
> + for (int i = 0; i < 3; i++)
> + do_vertex(i);
> +}
> +
> +[geometry shader]
> +#version 150
> +
> +in vec4 vertex_to_gs[3];
> +
> +void do_vertex(int i)
> +{
> + gl_Position = vertex_to_gs[i];
> + EmitVertex();
> +}
> +
> +[fragment shader]
> +#version 150
> +
> +out vec4 color;
> +
> +void main()
> +{
> + color = vec4(0.0, 1.0, 0.0, 1.0);
> +}
> +
> +[test]
> +link error
> --
> 1.8.3.4
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
This series is Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
More information about the Piglit
mailing list