John Kessenich | 085371d | 2015-11-16 09:31:26 -0700 | [diff] [blame] | 1 | #version 310 es
|
| 2 |
|
| 3 | in uint u1;
|
| 4 | in uvec2 u2;
|
| 5 | in uvec3 u3;
|
| 6 | in uvec4 u4;
|
| 7 |
|
| 8 | in float v1;
|
| 9 | in vec2 v2;
|
| 10 | in vec3 v3;
|
| 11 | in vec4 v4;
|
| 12 |
|
| 13 | in int i1;
|
| 14 | in ivec2 i2;
|
| 15 | in ivec3 i3;
|
| 16 | in ivec4 i4;
|
| 17 |
|
| 18 | out uvec4 uout;
|
| 19 | out ivec4 iout;
|
| 20 | out vec4 fout;
|
| 21 |
|
| 22 | void 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 | }
|