blob: aea454651dec86afbbc1cfd238082d5eccd384aa [file] [log] [blame]
John Kessenichc0275792013-08-09 17:14:49 +00001#version 400 core
2
John Kessenich623833f2013-12-11 18:57:40 +00003layout(vertices = 4) out; // ERROR
4layout(quads, cw) in;
5layout(triangles) in; // ERROR
6layout(isolines) in; // ERROR
7
John Kessenich623833f2013-12-11 18:57:40 +00008layout(ccw) in; // ERROR
John Kessenich7c908d22013-12-18 03:06:24 +00009layout(cw) in;
John Kessenich623833f2013-12-11 18:57:40 +000010
11layout(fractional_odd_spacing) in;
12layout(equal_spacing) in; // ERROR
13layout(fractional_even_spacing) in; // ERROR
14
15layout(point_mode) in;
16
John Kessenich116c30b2013-12-12 01:25:37 +000017patch in vec4 patchIn;
18patch out vec4 patchOut; // ERROR
19
John Kessenichc0275792013-08-09 17:14:49 +000020void main()
21{
22 barrier(); // ERROR
John Kessenich623833f2013-12-11 18:57:40 +000023
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;
34 float cd = gl_in[1].gl_ClipDistance[2];
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;
44 gl_ClipDistance[2] = cd;
John Kessenichc0275792013-08-09 17:14:49 +000045}
John Kessenich116c30b2013-12-12 01:25:37 +000046
47smooth patch in vec4 badp1; // ERROR
48flat patch in vec4 badp2; // ERROR
49noperspective patch in vec4 badp3; // ERROR
50patch sample in vec3 badp4; // ERROR
John Kessenich27151ef2013-12-13 19:26:54 +000051
52#extension GL_ARB_separate_shader_objects : enable
53
John Kessenich6e76bdc2015-06-19 23:03:32 +000054in gl_PerVertex // ERROR, no size
John Kessenich782aa832014-02-12 05:15:49 +000055{
John Kessenich6e76bdc2015-06-19 23:03:32 +000056 float gl_ClipDistance[1];
57} gl_in[];
John Kessenich27151ef2013-12-13 19:26:54 +000058
John Kessenich6e76bdc2015-06-19 23:03:32 +000059in gl_PerVertex // ERROR, second redeclaration of gl_in
John Kessenich782aa832014-02-12 05:15:49 +000060{
John Kessenich6e76bdc2015-06-19 23:03:32 +000061 float gl_ClipDistance[1];
John Kessenich782aa832014-02-12 05:15:49 +000062} gl_in[];
63
John Kessenich7c908d22013-12-18 03:06:24 +000064layout(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
John Kessenich08d18242013-12-20 18:36:27 +000073in vec2 ina; // ERROR, not array
74in vec2 inb[];
75in vec2 inc[18]; // ERROR, wrong size
76in vec2 ind[gl_MaxPatchVertices];
77
78in testbla {
79 int f;
80} bla; // ERROR, not array
81
82in testblb {
83 int f;
84} blb[];
85
86in testblc {
87 int f;
88} blc[18]; // ERROR wrong size
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
97
98layout(location = 23) out vec4 ovla[2];
99layout(location = 24) out vec4 ovlb[2]; // ERROR
John Kessenichd7dfe2c2014-05-06 22:58:55 +0000100
John Kessenich6e76bdc2015-06-19 23:03:32 +0000101in float gl_TessLevelOuter[4]; // ERROR, can't redeclare
John Kessenich71693382014-10-08 21:57:17 +0000102
103patch in pinbn {
104 int a;
105} pinbi;
John Kessenichc08fb8a2017-03-14 16:45:30 -0600106
107void devi()
108{
109 gl_DeviceIndex; // ERROR, no extension
110 gl_ViewIndex; // ERROR, no extension
111}
112
113#ifdef GL_EXT_device_group
114#extension GL_EXT_device_group : enable
115#endif
116
117#ifdef GL_EXT_device_group
118#extension GL_EXT_multiview : enable
119#endif
120
121void devie()
122{
123 gl_DeviceIndex;
124 gl_ViewIndex;
125}