• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 310 es
2
3in uint u1;
4in uvec2 u2;
5in uvec3 u3;
6in uvec4 u4;
7
8in float v1;
9in vec2 v2;
10in vec3 v3;
11in vec4 v4;
12
13in int i1;
14in ivec2 i2;
15in ivec3 i3;
16in ivec4 i4;
17
18out uvec4 uout;
19out ivec4 iout;
20out vec4 fout;
21
22void main()
23{
24    iout = ivec4(0);
25    uout = uvec4(0);
26    fout = vec4(0.0);
27
28    uvec2 u2out;
29    uout.xy += uaddCarry(u2, u2, u2out);
30    uout.xy += u2out;
31
32    uint u1out;
33    uout.x += usubBorrow(u1, u1, u1out);
34    uout.x += u1out;
35
36    uvec4 u4outHi, u4outLow;
37    umulExtended(u4, u4, u4outHi, u4outLow);
38    uout += u4outHi + u4outLow;
39
40    ivec4 i4outHi, i4outLow;
41    imulExtended(i4, i4, i4outHi, i4outLow);
42    iout += i4outLow + i4outHi;
43
44    ivec3 i3out;
45    fout.xyz += frexp(v3, i3out);
46    iout.xyz += i3out;
47    int i1out;
48    fout.x += frexp(v1, i1out);
49    iout.x += i1out;
50
51    fout.xy += ldexp(v2, i2);
52    fout.x += ldexp(v1, i1);
53
54    iout.x += bitfieldExtract(i1, 4, 5);
55    uout.xyz += bitfieldExtract(u3, 4, 5);
56    iout.xyz += bitfieldInsert(i3, i3, 4, 5);
57    uout.x += bitfieldInsert(u1, u1, 4, 5);
58    iout.xy += bitfieldReverse(i2);
59    uout += bitfieldReverse(u4);
60    iout.x += bitCount(i1);
61    iout.xyz += bitCount(u3);
62
63    iout.xy += findLSB(i2);
64    iout += findLSB(u4);
65    iout.x += findMSB(i1);
66    iout.xy += findMSB(u2);
67
68    uout.x += packUnorm4x8(v4);
69    uout.x += packSnorm4x8(v4);
70    fout += unpackUnorm4x8(u1);
71    fout += unpackSnorm4x8(u1);
72}
73