1#version 300 es 2 3uniform block { 4 mediump float f; 5} instanceName; 6 7struct S { 8 int i; 9} s; 10 11float a[5]; 12 13void main() 14{ 15 bool b; 16 float f; 17 int i; 18 uint u; 19 bvec3 b3; 20 vec3 v3; 21 ivec3 iv3; 22 uvec3 uv3; 23 vec4 v4; 24 ivec4 iv4; 25 uvec4 uv4; 26 mat2 m2; 27 mat4 m4; 28 29 // These are all errors: 30 instanceName + instanceName; 31 s + s; 32 i + f; 33 u + f; 34 u + i; 35 iv3 *= iv4; 36 iv4 / uv4; 37 i - v3; 38 iv3 + uv3; 39 a * a; 40 b / b; 41 42 f % f; 43 i % f; 44 f % u; 45 instanceName++; 46 ++s; 47 a--; 48 ++b3; 49 50 iv3 < uv3; 51 m2 > m2; 52 m2 != m4; 53 i >= u; 54 a <= a; 55 b > b; 56 57 b && b3; 58 b3 ^^ b3; 59 b3 || b; 60 i && i; 61 u || u; 62 m2 ^^ m2; 63 64 !u; 65 !i; 66 !m2; 67 !v3; 68 !a; 69 70 ~f; 71 ~m4; 72 ~v3; 73 ~a; 74 ~instanceName; 75 76 i << iv3; 77 u << uv3; 78 i >> f; 79 f >> i; 80 m4 >> i; 81 a >> u; 82 iv3 >> iv4; 83 84 i & u; 85 u &= uv3; 86 i | uv3; 87 u & f; 88 m2 | m2; 89 s ^ s; 90 (f = f) = f; 91 92 // These are all okay: 93 f * v4; 94 u + u; 95 uv4 / u; 96 iv3 -= iv3; 97 98 i %= 3; 99 uv3 % 4u; 100 --m2; 101 iv4++; 102 103 m4 != m4; 104 m2 == m2; 105 i <= i; 106 a == a; 107 s != s; 108 109 b && b; 110 b || b; 111 b ^^ b; 112 113 !b, uv3; 114 115 ~i; 116 ~u; 117 ~uv3; 118 ~iv3; 119 120 uv3 <<= i; 121 i >> i; 122 u << u; 123 iv3 >> iv3; 124 125 i & i; 126 u | u; 127 iv3 ^ iv3; 128 u & uv3; 129 uv3 | u; 130 uv3 &= u; 131 int arr[0x222 & 0xf]; 132 arr[1]; // size 2 133 int arr2[(uvec2(0, 0x2) | 0x1u).y]; 134 arr2[2]; // size 3 135} 136