]> git.tdb.fi Git - libs/gl.git/blobdiff - tests/glsl/inexact_function_argument_type.glsl
Resolve function calls where argument types need to be converted
[libs/gl.git] / tests / glsl / inexact_function_argument_type.glsl
diff --git a/tests/glsl/inexact_function_argument_type.glsl b/tests/glsl/inexact_function_argument_type.glsl
new file mode 100644 (file)
index 0000000..2bbece3
--- /dev/null
@@ -0,0 +1,18 @@
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+vec2 scale(vec2 v, float s)
+{
+       return v*s;
+}
+void main()
+{
+       gl_Position = vec4(scale(position.xy, 2), 0.0, 1.0);
+}
+
+/* Expected output: vertex
+layout(location=0) in vec4 position;
+void main()
+{
+       gl_Position = vec4(position.xy*float(2), 0.0, 1.0);
+}
+*/