[Piglit] [PATCH] arb_gpu_shader_fp64: verify function parameter overloads

Ian Romanick idr at freedesktop.org
Mon Jun 22 09:22:20 PDT 2015


On 06/17/2015 12:43 PM, Ilia Mirkin wrote:
> fp64 adds variants of all sorts of functions. make sure that we're still
> able to resolve otherwise-ambiguous calls in the presence of gs5.
> 
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  .../compiler/implicit-conversions-func.vert        | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>  create mode 100644 tests/spec/arb_gpu_shader_fp64/compiler/implicit-conversions-func.vert
> 
> diff --git a/tests/spec/arb_gpu_shader_fp64/compiler/implicit-conversions-func.vert b/tests/spec/arb_gpu_shader_fp64/compiler/implicit-conversions-func.vert
> new file mode 100644
> index 0000000..224aecb
> --- /dev/null
> +++ b/tests/spec/arb_gpu_shader_fp64/compiler/implicit-conversions-func.vert
> @@ -0,0 +1,22 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// require_extensions: GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5
> +// [end config]
> +
> +// Test that overloaded function selection still works in the presence
> +// of new double variants. ARB_gpu_shader5 provides the overload
> +// selection rules that allow the implementatino to pick one of the
                                     implementation

> +// candidates.
> +
> +#version 150
> +#extension GL_ARB_gpu_shader_fp64: enable
> +#extension GL_ARB_gpu_shader5: enable
> +
> +void foo(double a);
> +void foo(float a);
> +
> +void test() {
> +  mod(5, 6);
> +  foo(5);
> +}
> 

Which overload does the spec say is supposed to be used for foo(5)?  We
should provide an implementation for that overload, and make this a
linker test.


More information about the Piglit mailing list