[Piglit] [PATCH 3/8] glsl-1.50: test for interface block type mismatch error
Paul Berry
stereotype441 at gmail.com
Fri Feb 22 10:07:56 PST 2013
On 17 February 2013 10:31, Jordan Justen <jordan.l.justen at intel.com> wrote:
> This tests to see if an interface block with a type mismatch
> between the VS and FS causes a link error.
>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
> ...terface-blocks-member-type-mismatch.shader_test | 28
> ++++++++++++++++++++
> 1 file changed, 28 insertions(+)
> create mode 100644
> tests/spec/glsl-1.50/linker/interface-blocks-member-type-mismatch.shader_test
>
> diff --git
> a/tests/spec/glsl-1.50/linker/interface-blocks-member-type-mismatch.shader_test
> b/tests/spec/glsl-1.50/linker/interface-blocks-member-type-mismatch.shader_test
> new file mode 100644
> index 0000000..a996a4d
> --- /dev/null
> +++
> b/tests/spec/glsl-1.50/linker/interface-blocks-member-type-mismatch.shader_test
> @@ -0,0 +1,28 @@
> +[require]
> +GLSL >= 1.50
> +
> +[vertex shader]
> +#version 150
> +
> +uniform block {
> + vec4 a; // a is vec3 in FS
> +} inst_a;
> +
> +void main()
> +{
>
Although GLSL 1.50 no longer requires the shader to assign to gl_Position,
I'm aware of at least one implementation (Apple with AMD chipsets) which
runs into problems if gl_Position is not assigned. To be on the safe side,
I would recommend inserting "gl_Position = vec4(0.0);" here, just so that
an implementation won't erroneously pass this test due to bugs with
gl_Position.
I'd recommend making similar changes to patches 4-6.
With that change, this patch is:
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
> +}
> +
> +[fragment shader]
> +#version 150
> +
> +uniform block {
> + vec3 a; // a is vec4 in VS
> +} inst_b;
> +
> +void main()
> +{
> +}
> +
> +[test]
> +link error
> +
> --
> 1.7.10.4
>
> _______________________________________________
> 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/20130222/937c64a9/attachment.html>
More information about the Piglit
mailing list