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