[Piglit] [PATCH 1/2] GLSL 1.50: Test that version 140 and version 150 shaders can be linked together

Ian Romanick idr at freedesktop.org
Tue Oct 8 18:25:59 CEST 2013


On 09/27/2013 11:55 AM, Nicholas Mack wrote:
> ---
>  .../glsl-1.50/linker/versions-mingled.shader_test  | 29 ++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>  create mode 100644 tests/spec/glsl-1.50/linker/versions-mingled.shader_test
> 
> diff --git a/tests/spec/glsl-1.50/linker/versions-mingled.shader_test b/tests/spec/glsl-1.50/linker/versions-mingled.shader_test
> new file mode 100644
> index 0000000..543a778
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/linker/versions-mingled.shader_test
> @@ -0,0 +1,29 @@
> +# Tests that GLSL 1.40 and GLSL 1.50 shaders may be linked together
> +#
> +# GLSL 1.50 Spec, 3.3 ():
> +# "Shaders declaring version 1.40 of the shading language can be linked with
> +#  shaders declaring version 1.50 in the same program."
> +[require]
> +GLSL >= 1.50
> +
> +[vertex shader]

Put a comment here explaining why [vertex shader passthrough] can't be
used.  Something like:

/* This test can't use [vertex shader passthrough] because the vertex
 * shader needs an explicit version instead of one implied by the GLSL
 * line in the [require] section.
 */

> +#version 140
> +
> +in vec4 a;
> +
> +void main()
> +{
> +	gl_Position = a;
> +}
> +
> +[fragment shader]
> +#version 150
> +
> +void main()
> +{
> +	gl_FragColor = vec4(1.);
> +}
> +
> +[test]
> +
> +
> 



More information about the Piglit mailing list