• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 300 es
2in uvec2 badu;  // ERROR
3flat in uvec2 t;
4in highp float f;
5in highp vec2 tc;
6in bool bad;    // ERROR
7uniform uvec4 v;
8uniform int i;
9uniform bool b;
10
11out uvec4 c;
12
13uniform lowp usampler2D usampler;
14
15void main()
16{
17    int count = 1;
18
19    uint u = t.y + 3u;
20    const uint cu1error = 0xFFFFFFFF;  // ERROR
21    const uint cu1 = 0xFFFFFFFFU;
22    const uint cu2 = -1u;              // 0xFFFFFFFF
23    const uint cu3 = 1U;
24    const uint cu4error = 1;           // ERROR
25    const uint cu4 = 1u;
26
27    if (cu1 == cu2)
28        count *= 2;  // done
29    if (cu3 == cu4)
30        count *= 3;  // done
31    if (cu2 == cu3)
32        count *= 5;  // not done
33
34    const uint cushiftediierror = 0xFFFFFFFF  >> 10;   // ERROR
35    const  int  cshiftedii      = 0xFFFFFFFF  >> 10;
36    const uint cushiftedui      = 0xFFFFFFFFu >> 10;
37    const uint cushiftediuerror = 0xFFFFFFFF  >> 10u;  // ERROR
38    const  int  cshiftediu      = 0xFFFFFFFF  >> 10u;
39    const uint cushifteduu      = 0xFFFFFFFFu >> 10u;
40
41    if (cshiftedii == cshiftediu)
42        count *= 7;  // done
43    if (cushiftedui == cushifteduu)
44        count *= 11; // done
45    if (cshiftedii == int(cushiftedui))
46        count *= 13; // not done
47
48    uint shiftediierror = 0xFFFFFFFF  >> 10;   // ERROR
49     int shiftedii      = 0xFFFFFFFF  >> 10;
50    uint shiftedui      = 0xFFFFFFFFu >> 10;
51    uint shiftediuerror = 0xFFFFFFFF  >> 10u;  // ERROR
52     int shiftediu      = 0xFFFFFFFF  >> 10u;
53    uint shifteduu      = 0xFFFFFFFFu >> 10u;
54
55    if (shiftedii == shiftediu)
56        c = texture(usampler, tc);
57    if (shiftedui == shifteduu)
58        c = texture(usampler, tc + float(1u));
59    if (shiftedii == int(shiftedui))
60        c = texture(usampler, tc - vec2(2u));
61
62    if (t.x > 4u) {
63        float af = float(u);
64        bool ab = bool(u);
65        int ai = int(u);
66
67        c += uvec4(uint(af), uint(ab), uint(ai), count);
68    }
69
70    const uint cmask1 = 0x0A1u;
71    const uint cmask2 = 0xA10u;
72    const uint cmask3 = cmask1 << 4;
73    const uint cmask4 = 0xAB1u;
74
75    if (cmask3 == cmask2)
76        count *= 17;  // done
77
78    if ((cmask3 & cmask1) != 0u)
79        count *= 19; // not done
80
81    if ((cmask1 | cmask3) == cmask4)
82        count *= 23; // done
83
84    if ((cmask1 ^ cmask4) == 0xA10u)
85        count *= 27; // done
86
87    uint mask1 = 0x0A1u;
88    uint mask2 = 0xA10u;
89    uint mask3 = mask1 << 4;
90    uint mask4 = 0xAB1u;
91
92    if (mask3 == mask2)
93        count *= 100;
94
95    if ((mask3 & mask1) != 0u)
96        count *= 101;
97
98    if ((mask1 | mask3) == mask4)
99        count *= 102;
100
101    if ((mask1 ^ mask4) == 0xA10u)
102        count *= 103;
103
104    c += uvec4(count);
105}
106