summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-04-21 11:52:05 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-04-21 15:36:36 -0700
commit67a092ae09dbb2dd820aab5aa7742d3f884d6cd4 (patch)
tree4929579dd2967dc567d71599e00746f06155f1f0 /tests
parentff236fa9b6a35ce261098d288f77f238c3286e15 (diff)
Ensure that both parameter lists are the same length in function overloading.
Fixes new test function-05.glsl, where the second function has matching parameter types, but less of them.
Diffstat (limited to 'tests')
-rw-r--r--tests/function-05.glsl26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/function-05.glsl b/tests/function-05.glsl
new file mode 100644
index 0000000000..43365bf606
--- /dev/null
+++ b/tests/function-05.glsl
@@ -0,0 +1,26 @@
+/* PASS */
+
+vec4 foo(in float x, in float y, float z, float w)
+{
+ vec4 v;
+ v.x = x;
+ v.y = y;
+ v.z = z;
+ v.w = w;
+ return v;
+}
+
+vec4 foo(in float x)
+{
+ vec4 v;
+ v.x = x;
+ v.y = x;
+ v.z = x;
+ v.w = x;
+}
+
+void main()
+{
+ gl_Position = foo(1.0, 1.0, 1.0, 0.0);
+ gl_Position = foo(2.0);
+}