[Piglit] [PATCH 3/3] GLSL 1.50: Test that linking fails if there is a geom shader without a vert shader
Paul Berry
stereotype441 at gmail.com
Mon Aug 26 11:52:22 PDT 2013
On 23 August 2013 15:13, Nicholas Mack <nichmack at gmail.com> wrote:
> ---
> .../glsl-1.50/linker/gs-without-vs.shader_test | 39
> ++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
> create mode 100644 tests/spec/glsl-1.50/linker/gs-without-vs.shader_test
>
> diff --git a/tests/spec/glsl-1.50/linker/gs-without-vs.shader_test
> b/tests/spec/glsl-1.50/linker/gs-without-vs.shader_test
> new file mode 100644
> index 0000000..05c14dc
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/linker/gs-without-vs.shader_test
> @@ -0,0 +1,39 @@
> +# Section 2.11.2 (Program Objects) of the GLSL 1.50 spec says:
> +#
> +# "Linking will also fail if the program object contains objects to form a
> +# geometry shader (see section 2.12), and
> +# • the program contains no objects to form a vertex shader;
> +# • the input primitive type, output primitive type, or maximum
> output
> +# vertex count is not specified in any compiled geometry shader
> object;
> +# • the input primitive type, output primitive type, or maximum
> output
> +# vertex count is specified differently in multiple geometry shader
> +# objects."
> +
> +[require]
> +GLSL >= 1.50
> +
> +[geometry shader]
> +#version 150
> +
> +layout(triangles) in;
> +layout(triangles, max_vertices = 3) out;
> +
> +in vec4 vertex[3];
> +
> +void main()
> +{
> + gl_Position = vertex[0];
> + EmitVertex();
> +}
> +
> +[fragment shader]
> +#version 150
> +
> +out vec4 color;
> +
> +void main()
> +{
> + color = vec4(0.0, 1.0, 0.0, 1.0);
> +}
> +
> +[test]
>
I think you forgot to add to the end of the test:
link error
With that fixed, this patch is:
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130826/0d18d1cb/attachment.html>
More information about the Piglit
mailing list