[Piglit] [PATCH 1/2] glsl-1.50: test for interface block name mismatch error

Jordan Justen jljusten at gmail.com
Tue Jul 23 09:04:23 PDT 2013


Series Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

On Mon, Jul 22, 2013 at 3:49 PM, Matt Turner <mattst88 at gmail.com> wrote:
> This tests to see if an interface block with a name mismatch
> between the VS and FS causes a link error.
> ---
>  ...terface-blocks-member-name-mismatch.shader_test | 37 ++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
>  create mode 100644 tests/spec/glsl-1.50/linker/interface-blocks-member-name-mismatch.shader_test
>
> diff --git a/tests/spec/glsl-1.50/linker/interface-blocks-member-name-mismatch.shader_test b/tests/spec/glsl-1.50/linker/interface-blocks-member-name-mismatch.shader_test
> new file mode 100644
> index 0000000..cc0fd4c
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/linker/interface-blocks-member-name-mismatch.shader_test
> @@ -0,0 +1,37 @@
> +# Tests that a link error occurs when an interface block member's name
> +# differs between the vertex and fragment shaders.
> +#
> +# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
> +# "Matched block names within an interface (as defined above) must match
> +#  in terms of having the same number of declarations with the same
> +#  sequence of types and the same sequence of member names, as well as
> +#  having the same member-wise layout qualification (see next section)."
> +[require]
> +GLSL >= 1.50
> +
> +[vertex shader]
> +#version 150
> +
> +uniform block {
> +       vec4 a; // a is named b in FS
> +} inst_a;
> +
> +void main()
> +{
> +    gl_Position = vec4(0.0);
> +}
> +
> +[fragment shader]
> +#version 150
> +
> +uniform block {
> +       vec4 b; // b is named a in VS
> +} inst_b;
> +
> +void main()
> +{
> +}
> +
> +[test]
> +link error
> +
> --
> 1.8.1.5
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list