John Kessenich | 0fbb0c4 | 2013-06-06 18:31:21 +0000 | [diff] [blame] | 1 | #version 300 es |
2 | |||||
John Kessenich | 41a36bb | 2013-06-19 05:41:25 +0000 | [diff] [blame] | 3 | precision mediump float; |
4 | |||||
John Kessenich | 0fbb0c4 | 2013-06-06 18:31:21 +0000 | [diff] [blame] | 5 | struct S { |
6 | vec4 u; | ||||
7 | uvec4 v; | ||||
John Kessenich | 41a36bb | 2013-06-19 05:41:25 +0000 | [diff] [blame] | 8 | lowp isampler3D sampler; |
John Kessenich | 0fbb0c4 | 2013-06-06 18:31:21 +0000 | [diff] [blame] | 9 | vec3 w; |
10 | struct T1 { // ERROR | ||||
11 | int a; | ||||
12 | } t; | ||||
13 | }; | ||||
14 | |||||
15 | uniform S s; | ||||
16 | |||||
17 | uniform fooBlock { | ||||
18 | uvec4 bv; | ||||
John Kessenich | 5053a39 | 2014-01-07 17:44:41 +0000 | [diff] [blame] | 19 | uniform mat2 bm2; |
John Kessenich | 41a36bb | 2013-06-19 05:41:25 +0000 | [diff] [blame] | 20 | lowp isampler2D sampler; // ERROR |
John Kessenich | 3cd0024 | 2015-09-30 18:57:47 -0600 | [diff] [blame^] | 21 | struct T2 { // ERROR |
John Kessenich | 0fbb0c4 | 2013-06-06 18:31:21 +0000 | [diff] [blame] | 22 | int a; |
23 | } t; | ||||
John Kessenich | 3cd0024 | 2015-09-30 18:57:47 -0600 | [diff] [blame^] | 24 | S fbs; // ERROR, contains a sampler |
John Kessenich | 0fbb0c4 | 2013-06-06 18:31:21 +0000 | [diff] [blame] | 25 | }; |
26 | |||||
27 | uniform barBlock { | ||||
28 | uvec4 nbv; | ||||
29 | int ni; | ||||
30 | } inst; | ||||
31 | |||||
32 | uniform barBlockArray { | ||||
33 | uvec4 nbv; | ||||
34 | int ni; | ||||
35 | } insts[4]; | ||||
36 | |||||
John Kessenich | 06f8464 | 2013-06-24 17:26:56 +0000 | [diff] [blame] | 37 | uniform unreferenced { |
38 | float f; | ||||
39 | uint u; | ||||
40 | }; | ||||
41 | |||||
John Kessenich | 0fbb0c4 | 2013-06-06 18:31:21 +0000 | [diff] [blame] | 42 | void main() |
43 | { | ||||
44 | texture(s.sampler, vec3(inst.ni, bv.y, insts[2].nbv.z)); | ||||
John Kessenich | 41a36bb | 2013-06-19 05:41:25 +0000 | [diff] [blame] | 45 | insts[s.v.x]; // ERROR |
John Kessenich | e9022e1 | 2015-07-20 12:03:04 -0600 | [diff] [blame] | 46 | fooBlock; // ERROR |
47 | mat4(s); // ERROR | ||||
48 | int insts; | ||||
49 | float barBlock; | ||||
50 | mat4(barBlock); | ||||
51 | mat4(unreferenced); // ERROR, bad type | ||||
52 | ++s; // ERROR | ||||
53 | inst - 1; // ERROR | ||||
54 | ++barBlock; | ||||
55 | 2 * barBlockArray; // ERROR | ||||
John Kessenich | 0fbb0c4 | 2013-06-06 18:31:21 +0000 | [diff] [blame] | 56 | } |
John Kessenich | e9022e1 | 2015-07-20 12:03:04 -0600 | [diff] [blame] | 57 | |
58 | int fooBlock; // ERROR, redef. |