blob: 88539cb5954e5798b3ec57a72367b387a622f1fd [file] [log] [blame]
John Kessenichdb6b9112013-02-25 19:44:56 +00001#version 300 es
2
3uniform sampler2D s2D;
John Kessenich41a36bb2013-06-19 05:41:25 +00004uniform lowp sampler3D s3D;
John Kessenichdb6b9112013-02-25 19:44:56 +00005uniform samplerCube sCube;
John Kessenich41a36bb2013-06-19 05:41:25 +00006uniform lowp samplerCubeShadow sCubeShadow;
7uniform lowp sampler2DShadow s2DShadow;
8uniform lowp sampler2DArray s2DArray;
9uniform lowp sampler2DArrayShadow s2DArrayShadow;
John Kessenichdb6b9112013-02-25 19:44:56 +000010
John Kessenich41a36bb2013-06-19 05:41:25 +000011uniform lowp isampler2D is2D;
12uniform lowp isampler3D is3D;
13uniform lowp isamplerCube isCube;
14uniform lowp isampler2DArray is2DArray;
John Kessenichdb6b9112013-02-25 19:44:56 +000015
John Kessenich41a36bb2013-06-19 05:41:25 +000016uniform lowp usampler2D us2D;
17uniform lowp usampler3D us3D;
18uniform lowp usamplerCube usCube;
19uniform lowp usampler2DArray us2DArray;
20precision lowp float;
John Kessenichdb6b9112013-02-25 19:44:56 +000021in float c1D;
22in vec2 c2D;
23in vec3 c3D;
John Kessenichc2ff7702013-04-25 16:44:03 +000024smooth vec4 c4D;
John Kessenichdb6b9112013-02-25 19:44:56 +000025
John Kessenich3ed2db52013-04-07 22:43:16 +000026flat in int ic1D;
27flat in ivec2 ic2D;
28flat in ivec3 ic3D;
29flat in ivec4 ic4D;
John Kessenichc2ff7702013-04-25 16:44:03 +000030noperspective in vec4 badv; // ERROR
John Kessenich41a36bb2013-06-19 05:41:25 +000031in sampler2D bads; // ERROR
32precision lowp uint; // ERROR
John Kessenich3ed2db52013-04-07 22:43:16 +000033
34struct s {
35 int i;
John Kessenich41a36bb2013-06-19 05:41:25 +000036 sampler2D s;
John Kessenich3ed2db52013-04-07 22:43:16 +000037};
38
John Kessenich41a36bb2013-06-19 05:41:25 +000039out s badout; // ERROR
John Kessenichdb6b9112013-02-25 19:44:56 +000040
John Kessenichb29ba332013-06-21 19:43:44 +000041struct S2 {
42 vec3 c;
43 float f;
44};
45
46in S2 s2;
47
48out vec3 sc;
49out float sf;
50
John Kessenicheebed6f2013-06-24 21:52:41 +000051uniform sampler2D arrayedSampler[5];
52
John Kessenichdb6b9112013-02-25 19:44:56 +000053void main()
54{
John Kessenichdf807512013-02-26 19:48:48 +000055 float f;
56 vec4 v;
57 v = texture(s2D, c2D);
58 v = textureProj(s3D, c4D);
59 v = textureLod(s2DArray, c3D, 1.2);
60 f = textureOffset(s2DShadow, c3D, ic2D, c1D);
61 v = texelFetch(s3D, ic3D, ic1D);
John Kessenicheebed6f2013-06-24 21:52:41 +000062 v = texelFetchOffset(arrayedSampler[2], ic2D, 4, ic2D);
John Kessenichdf807512013-02-26 19:48:48 +000063 f = textureLodOffset(s2DShadow, c3D, c1D, ic2D);
64 v = textureProjLodOffset(s2D, c3D, c1D, ic2D);
65 v = textureGrad(sCube, c3D, c3D, c3D);
66 f = textureGradOffset(s2DArrayShadow, c4D, c2D, c2D, ic2D);
67 v = textureProjGrad(s3D, c4D, c3D, c3D);
68 v = textureProjGradOffset(s2D, c3D, c2D, c2D, ic2D);
John Kessenicheebed6f2013-06-24 21:52:41 +000069 v = texture(arrayedSampler[ic1D], c2D); // ERROR
John Kessenichdb6b9112013-02-25 19:44:56 +000070
John Kessenichdf807512013-02-26 19:48:48 +000071 ivec4 iv;
72 iv = texture(is2D, c2D);
73 iv = textureProjOffset(is2D, c4D, ic2D);
74 iv = textureProjLod(is2D, c3D, c1D);
75 iv = textureProjGrad(is2D, c3D, c2D, c2D);
76 iv = texture(is3D, c3D, 4.2);
77 iv = textureLod(isCube, c3D, c1D);
78 iv = texelFetch(is2DArray, ic3D, ic1D);
John Kessenichdb6b9112013-02-25 19:44:56 +000079
John Kessenichdf807512013-02-26 19:48:48 +000080 iv.xy = textureSize(sCubeShadow, 2);
John Kessenichc2ff7702013-04-25 16:44:03 +000081
82 float precise;
83 double boo; // ERROR
84 dvec2 boo2; // ERROR
85 dvec3 boo3; // ERROR
86 dvec4 boo4; // ERROR
John Kessenich3ce57452013-06-07 18:54:19 +000087
88 f += gl_FragCoord.y;
89 gl_FragDepth = f;
John Kessenichb29ba332013-06-21 19:43:44 +000090
91 sc = s2.c;
92 sf = s2.f;
John Kessenichebf08252013-06-24 22:40:19 +000093
94 sinh(c1D) +
95 cosh(c1D) * tanh(c2D);
96 asinh(c4D) + acosh(c4D);
97 atanh(c3D);
John Kessenichdb6b9112013-02-25 19:44:56 +000098}
John Kessenichc2ff7702013-04-25 16:44:03 +000099
John Kesseniche369bfc2013-06-26 05:54:40 +0000100uniform multi {
101 int[2] a[3]; // ERROR
102 int[2][3] b; // ERROR
103 int c[2][3]; // ERROR
104} multiInst[2][3]; // ERROR
105
John Kessenichc2ff7702013-04-25 16:44:03 +0000106float imageBuffer; // ERROR, reserved
107float uimage2DRect; // ERROR, reserved