[Piglit] [PATCH] arb_shading_language_420pack: test invalid function return type

apinheiro apinheiro at igalia.com
Fri Feb 22 10:52:48 UTC 2019


Perhaps a spec quote? With or without it:

Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>

On 21/2/19 12:50, Tapani Pälli wrote:
> Extension adds implicit conversion for return types. This test checks
> that driver does not incorrectly allow invalid return type.
>
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>   .../implicit-conversion-invalid-type.frag     | 21 +++++++++++++++++++
>   1 file changed, 21 insertions(+)
>   create mode 100644 tests/spec/arb_shading_language_420pack/compiler/implicit-conversion-invalid-type.frag
>
> diff --git a/tests/spec/arb_shading_language_420pack/compiler/implicit-conversion-invalid-type.frag b/tests/spec/arb_shading_language_420pack/compiler/implicit-conversion-invalid-type.frag
> new file mode 100644
> index 000000000..9fc24d9ee
> --- /dev/null
> +++ b/tests/spec/arb_shading_language_420pack/compiler/implicit-conversion-invalid-type.frag
> @@ -0,0 +1,21 @@
> +/* [config]
> + * expect_result: fail
> + * glsl_version: 1.30
> + * require_extensions: GL_ARB_shading_language_420pack
> + * [end config]
> + */
> +#version 130
> +#extension GL_ARB_shading_language_420pack: enable
> +
> +out vec4 color;
> +
> +int test()
> +{
> +	/* Return invalid type, this should not succeed. */
> +	return ivec2(0);
> +}
> +
> +void main()
> +{
> +        color = vec4(test());
> +}


More information about the Piglit mailing list