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