11 out fromVertex { // okay to reuse a block name for another block name
\r
17 } fromVertex; // ERROR, cannot reuse block name as block instance
\r
19 int fromVertex; // ERROR, cannot reuse a block name for something else
\r
23 } fooC; // ERROR, cannot have same name for block and instance name
\r
29 EmitStreamVertex(1); // ERROR
\r
30 EndStreamPrimitive(0); // ERROR
\r
32 color = fromV[0].color;
\r
33 gl_ClipDistance[3] = gl_in[1].gl_ClipDistance[2];
\r
34 gl_Position = gl_in[0].gl_Position;
\r
35 gl_PointSize = gl_in[3].gl_PointSize;
\r
36 gl_PrimitiveID = gl_PrimitiveIDIn;
\r
40 out vec4 ov0; // stream should be 0
\r
41 layout(stream = 4) out vec4 ov4;
\r
42 out vec4 o1v0; // stream should be 0
\r
44 layout(stream = 3) uniform; // ERROR
\r
45 layout(stream = 3) in; // ERROR
\r
46 layout(stream = 3) uniform int ua; // ERROR
\r
47 layout(stream = 3) uniform ubb { int ua; } ibb; // ERROR
\r
49 layout(line_strip, points, triangle_strip, stream = 3, points, triangle_strip) out; // just means "stream = 3, triangle_strip"
\r
50 layout(stream = 3, triangle_strip) out;
\r
51 out vec4 ov3; // stream should be 3
\r
53 layout(stream = 6) out ooutb { vec4 a; } ouuaa6;
\r
55 layout(stream = 6) out ooutb2 {
\r
56 layout(stream = 6) vec4 a;
\r
59 layout(stream = 7) out ooutb3 {
\r
60 layout(stream = 6) vec4 a; // ERROR
\r
63 out vec4 ov2s3; // stream should be 3
\r
65 layout(max_vertices = 200) out;
\r
66 layout(max_vertices = 300) out; // ERROR, too big
\r
67 void foo(layout(max_vertices = 4) int a) // ERROR
\r
69 ouuaa6.a = vec4(1.0);
\r
72 layout(line_strip, points, triangle_strip, stream = 3, points) out; // ERROR, changing output primitive
\r
73 layout(line_strip, points, stream = 3) out; // ERROR, changing output primitive
\r
74 layout(triangle_strip) in; // ERROR, not an input primitive
\r
75 layout(triangle_strip) uniform; // ERROR
\r
76 layout(triangle_strip) out vec4 badv4; // ERROR, not on a variable
\r
77 layout(triangle_strip) in vec4 bad2v4[]; // ERROR, not on a variable or input
\r
78 layout(invocations = 3) out outbn { int a; }; // 2 ERROR, not on a block, not until 4.0
\r
80 layout(invocations = 3) int a; // 2 ERRORs, not on a block member, not until 4.0
\r
81 layout(max_vertices = 3) int b; // ERROR, not on a block member
\r
82 layout(triangle_strip) int c; // ERROR, not on a block member
\r
85 layout(lines) out; // ERROR, not on output
\r
86 layout(lines_adjacency) in;
\r
87 layout(triangles) in; // ERROR, can't change it
\r
88 layout(triangles_adjacency) in; // ERROR, can't change it
\r
89 layout(invocations = 4) in; // ERROR, not until 4.0
\r
92 layout(stream = 2) int a; // ERROR, stream on input
\r
107 float summ = gl_MaxVertexAttribs +
\r
108 gl_MaxVertexUniformComponents +
\r
109 gl_MaxVaryingFloats +
\r
110 gl_MaxVaryingComponents +
\r
111 gl_MaxVertexOutputComponents +
\r
112 gl_MaxGeometryInputComponents +
\r
113 gl_MaxGeometryOutputComponents +
\r
114 gl_MaxFragmentInputComponents +
\r
115 gl_MaxVertexTextureImageUnits +
\r
116 gl_MaxCombinedTextureImageUnits +
\r
117 gl_MaxTextureImageUnits +
\r
118 gl_MaxFragmentUniformComponents +
\r
119 gl_MaxDrawBuffers +
\r
120 gl_MaxClipDistances +
\r
121 gl_MaxGeometryTextureImageUnits +
\r
122 gl_MaxGeometryOutputVertices +
\r
123 gl_MaxGeometryTotalOutputComponents +
\r
124 gl_MaxGeometryUniformComponents +
\r
125 gl_MaxGeometryVaryingComponents;
\r
129 gl_ViewportIndex = gl_MaxViewports - 1;
\r
132 #extension GL_ARB_viewport_array : enable
\r
136 gl_ViewportIndex = gl_MaxViewports - 1;
\r
139 out int gl_ViewportIndex;
\r