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

Ilia Mirkin imirkin at alum.mit.edu
Wed Jun 17 12:43:39 PDT 2015


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
+// 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);
+}
-- 
2.3.6



More information about the Piglit mailing list