summaryrefslogtreecommitdiff
path: root/progs/slang/vstest.txt
diff options
context:
space:
mode:
authorMichal Krol <mjkrol@gmail.org>2006-05-16 09:32:30 +0000
committerMichal Krol <mjkrol@gmail.org>2006-05-16 09:32:30 +0000
commit32c2f939e6ddf840285c40253f78e025d4377d61 (patch)
tree9cbe9be9bd33a24e4fdde18fe8aae3a0be10daeb /progs/slang/vstest.txt
parent2ca741ad4b95ce5c91b99c4628e5e5e256f3e1d9 (diff)
GLSL regression test suite.
Diffstat (limited to 'progs/slang/vstest.txt')
-rw-r--r--progs/slang/vstest.txt68
1 files changed, 68 insertions, 0 deletions
diff --git a/progs/slang/vstest.txt b/progs/slang/vstest.txt
new file mode 100644
index 0000000000..ac4fceb1c6
--- /dev/null
+++ b/progs/slang/vstest.txt
@@ -0,0 +1,68 @@
+/*
+ * Vertex shader test.
+ * Uses all conventional attributes and 15 generic attributes to print
+ * their values, using printMESA() extension function, to the debugger
+ * to compare them with the actual passed-in values.
+ * Use different types for generic attributes to check matrix handling.
+ *
+ * Author: Michal Krol
+ */
+
+#version 110
+
+//#extension MESA_shader_debug: require
+
+attribute vec4 Attribute1;
+attribute vec4 Attribute2;
+attribute vec4 Attribute3;
+attribute float Attribute4;
+attribute vec2 Attribute5;
+attribute vec3 Attribute6;
+attribute mat2 Attribute7;
+attribute mat3 Attribute9;
+attribute mat4 Attribute12;
+
+void main ()
+{
+ //
+ // Do some legal stuff.
+ //
+ gl_Position = gl_ModelViewMatrix * gl_Vertex;
+ gl_FrontColor = vec4 (1.0);
+
+ //
+ // Conventional attributes - except for gl_Vertex.
+ //
+ printMESA (gl_Color);
+ printMESA (gl_SecondaryColor);
+ printMESA (gl_Normal);
+ printMESA (gl_MultiTexCoord0);
+ printMESA (gl_MultiTexCoord1);
+ printMESA (gl_MultiTexCoord2);
+ printMESA (gl_MultiTexCoord3);
+ printMESA (gl_MultiTexCoord4);
+ printMESA (gl_MultiTexCoord5);
+ printMESA (gl_MultiTexCoord6);
+ printMESA (gl_MultiTexCoord7);
+ printMESA (gl_FogCoord);
+
+ //
+ // Generic attributes - attrib with index 0 is not used because it would
+ // alias with gl_Vertex, which is not allowed.
+ //
+ printMESA (Attribute1);
+ printMESA (Attribute2);
+ printMESA (Attribute3);
+ printMESA (Attribute4);
+ printMESA (Attribute5);
+ printMESA (Attribute6);
+ printMESA (Attribute7);
+ printMESA (Attribute9);
+ printMESA (Attribute12);
+
+ //
+ // Vertex position goes last.
+ //
+ printMESA (gl_Vertex);
+}
+