]> git.tdb.fi Git - libs/gl.git/blobdiff - tests/glsl/multiline_function_inline.glsl
Add a unit test framework and some tests for the GLSL compiler
[libs/gl.git] / tests / glsl / multiline_function_inline.glsl
diff --git a/tests/glsl/multiline_function_inline.glsl b/tests/glsl/multiline_function_inline.glsl
new file mode 100644 (file)
index 0000000..e8f05bd
--- /dev/null
@@ -0,0 +1,22 @@
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+layout(location=1) in float scale;
+vec4 func()
+{
+       float s = scale*2.0;
+       return position*s*s;
+}
+void main()
+{
+       gl_Position = func();
+}
+
+/* Expected output: vertex
+layout(location=0) in vec4 position;
+layout(location=1) in float scale;
+void main()
+{
+       float s = scale*2.0;
+       gl_Position = position*s*s;
+}
+*/