3 * Uses all conventional attributes and 15 generic attributes to print
4 * their values, using printMESA() extension function, to the debugger
5 * to compare them with the actual passed-in values.
6 * Use different types for generic attributes to check matrix handling.
13 #extension MESA_shader_debug: require
15 attribute vec4 Attribute1;
16 attribute vec4 Attribute2;
17 attribute vec4 Attribute3;
18 attribute float Attribute4;
19 attribute vec2 Attribute5;
20 attribute vec3 Attribute6;
21 attribute mat2 Attribute7;
22 attribute mat3 Attribute9;
23 attribute mat4 Attribute12;
28 // Do some legal stuff.
30 gl_Position = gl_ModelViewMatrix * gl_Vertex;
31 gl_FrontColor = vec4 (1.0);
34 // Conventional attributes - except for gl_Vertex.
37 printMESA (gl_SecondaryColor);
38 printMESA (gl_Normal);
39 printMESA (gl_MultiTexCoord0);
40 printMESA (gl_MultiTexCoord1);
41 printMESA (gl_MultiTexCoord2);
42 printMESA (gl_MultiTexCoord3);
43 printMESA (gl_MultiTexCoord4);
44 printMESA (gl_MultiTexCoord5);
45 printMESA (gl_MultiTexCoord6);
46 printMESA (gl_MultiTexCoord7);
47 printMESA (gl_FogCoord);
50 // Generic attributes - attrib with index 0 is not used because it would
51 // alias with gl_Vertex, which is not allowed.
53 printMESA (Attribute1);
54 printMESA (Attribute2);
55 printMESA (Attribute3);
56 printMESA (Attribute4);
57 printMESA (Attribute5);
58 printMESA (Attribute6);
59 printMESA (Attribute7);
60 printMESA (Attribute9);
61 printMESA (Attribute12);
64 // Vertex position goes last.
66 printMESA (gl_Vertex);