• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 320 es
2
3layout(vertices = 4) out; // ERROR
4layout(quads, cw) in;
5layout(triangles) in;     // ERROR
6layout(isolines) in;      // ERROR
7
8layout(ccw) in;           // ERROR
9layout(cw) in;
10
11layout(fractional_odd_spacing) in;
12layout(equal_spacing) in;              // ERROR
13layout(fractional_even_spacing) in;    // ERROR
14
15layout(point_mode) in;
16
17patch in vec4 patchIn;
18patch out vec4 patchOut;  // ERROR
19
20void main()
21{
22    barrier(); // ERROR
23
24    int a = gl_MaxTessEvaluationInputComponents +
25            gl_MaxTessEvaluationOutputComponents +
26            gl_MaxTessEvaluationTextureImageUnits +
27            gl_MaxTessEvaluationUniformComponents +
28            gl_MaxTessPatchComponents +
29            gl_MaxPatchVertices +
30            gl_MaxTessGenLevel;
31
32    vec4 p = gl_in[1].gl_Position;
33    float ps = gl_in[1].gl_PointSize;        // ERROR, need point_size extension
34    float cd = gl_in[1].gl_ClipDistance[2];  // ERROR, not in ES
35
36    int pvi = gl_PatchVerticesIn;
37    int pid = gl_PrimitiveID;
38    vec3 tc = gl_TessCoord;
39    float tlo = gl_TessLevelOuter[3];
40    float tli = gl_TessLevelInner[1];
41
42    gl_Position = p;
43    gl_PointSize = ps;             // ERROR, need point_size extension
44    gl_ClipDistance[2] = cd;       // ERROR, not in ES
45}
46
47smooth patch in vec4 badp1;         // ERROR
48flat patch in vec4 badp2;           // ERROR
49noperspective patch in vec4 badp3;  // ERROR
50patch sample in vec3 badp4;         // ERROR
51
52#extension GL_ARB_separate_shader_objects : enable
53
54in gl_PerVertex
55{
56    vec4 gl_Position;
57} gl_in[];
58
59in gl_PerVertex           // ERROR, second redeclaration of gl_in
60{
61    vec4 gl_Position;
62} gl_in[];
63
64layout(quads, cw) out;     // ERROR
65layout(triangles) out;     // ERROR
66layout(isolines) out;      // ERROR
67layout(cw) out;            // ERROR
68layout(fractional_odd_spacing) out;    // ERROR
69layout(equal_spacing) out;             // ERROR
70layout(fractional_even_spacing) out;   // ERROR
71layout(point_mode) out;                // ERROR
72
73in vec2 ina;      // ERROR, not array
74in vec2 inb[];
75in vec2 inc[18];  // ERROR, wrong size
76in vec2 ind[gl_MaxPatchVertices];
77
78in testbla {      // ERROR, not array
79    int f;
80} bla;
81
82in testblb {
83    int f;
84} blb[];
85
86in testblc { // ERROR wrong size
87    int f;
88} blc[18];
89
90in testbld {
91    int f;
92} bld[gl_MaxPatchVertices];
93
94layout(location = 23) in vec4 ivla[];
95layout(location = 24) in vec4 ivlb[];
96layout(location = 24) in vec4 ivlc[];  // ERROR, overlap
97
98layout(location = 23) out vec4 ovla[2];
99layout(location = 24) out vec4 ovlb[2];  // ERROR, overlap
100
101in float gl_TessLevelOuter[4];           // ERROR, can't redeclare
102
103patch in pinbn {
104    int a;
105} pinbi;
106
107centroid out vec3 myColor2;
108centroid in vec3 centr[];
109sample out vec4 perSampleColor;
110
111void bbbad()
112{
113    gl_BoundingBoxOES; // ERROR, wrong stage
114}
115