| 1 |
#version 450 |
| 2 |
layout(local_size_x = 1) in; |
| 3 |
|
| 4 |
layout(binding = 0, std430) buffer SSBO |
| 5 |
{ |
| 6 |
float res; |
| 7 |
int ires; |
| 8 |
uint ures; |
| 9 |
|
| 10 |
vec4 f32; |
| 11 |
ivec4 s32; |
| 12 |
uvec4 u32; |
| 13 |
|
| 14 |
mat2 m2; |
| 15 |
mat3 m3; |
| 16 |
mat4 m4; |
| 17 |
}; |
| 18 |
|
| 19 |
void main() |
| 20 |
{ |
| 21 |
float tmp; |
| 22 |
vec2 v2; |
| 23 |
vec3 v3; |
| 24 |
vec4 v4; |
| 25 |
int itmp; |
| 26 |
|
| 27 |
res = round(f32.x); |
| 28 |
//res = roundEven(f32.x); |
| 29 |
res = trunc(f32.x); |
| 30 |
res = abs(f32.x); |
| 31 |
ires = abs(s32.x); |
| 32 |
res = sign(f32.x); |
| 33 |
ires = sign(s32.x); |
| 34 |
res = floor(f32.x); |
| 35 |
res = ceil(f32.x); |
| 36 |
res = fract(f32.x); |
| 37 |
res = radians(f32.x); |
| 38 |
res = degrees(f32.x); |
| 39 |
res = sin(f32.x); |
| 40 |
res = cos(f32.x); |
| 41 |
res = tan(f32.x); |
| 42 |
res = asin(f32.x); |
| 43 |
res = acos(f32.x); |
| 44 |
res = atan(f32.x); |
| 45 |
res = sinh(f32.x); |
| 46 |
res = cosh(f32.x); |
| 47 |
res = tanh(f32.x); |
| 48 |
//res = asinh(f32.x); |
| 49 |
//res = acosh(f32.x); |
| 50 |
//res = atanh(f32.x); |
| 51 |
res = atan(f32.x, f32.y); |
| 52 |
res = pow(f32.x, f32.y); |
| 53 |
res = exp(f32.x); |
| 54 |
res = log(f32.x); |
| 55 |
res = exp2(f32.x); |
| 56 |
res = log2(f32.x); |
| 57 |
res = sqrt(f32.x); |
| 58 |
res = inversesqrt(f32.x); |
| 59 |
|
| 60 |
res = length(f32.x); |
| 61 |
res = distance(f32.x, f32.y); |
| 62 |
res = normalize(f32.x); |
| 63 |
res = faceforward(f32.x, f32.y, f32.z); |
| 64 |
res = reflect(f32.x, f32.y); |
| 65 |
res = refract(f32.x, f32.y, f32.z); |
| 66 |
|
| 67 |
res = length(f32.xy); |
| 68 |
res = distance(f32.xy, f32.zw); |
| 69 |
v2 = normalize(f32.xy); |
| 70 |
v2 = faceforward(f32.xy, f32.yz, f32.zw); |
| 71 |
v2 = reflect(f32.xy, f32.zw); |
| 72 |
v2 = refract(f32.xy, f32.yz, f32.w); |
| 73 |
|
| 74 |
v3 = cross(f32.xyz, f32.yzw); |
| 75 |
|
| 76 |
res = determinant(m2); |
| 77 |
res = determinant(m3); |
| 78 |
res = determinant(m4); |
| 79 |
m2 = inverse(m2); |
| 80 |
m3 = inverse(m3); |
| 81 |
m4 = inverse(m4); |
| 82 |
|
| 83 |
res = modf(f32.x, tmp); |
| 84 |
// ModfStruct |
| 85 |
|
| 86 |
res = min(f32.x, f32.y); |
| 87 |
ures = min(u32.x, u32.y); |
| 88 |
ires = min(s32.x, s32.y); |
| 89 |
res = max(f32.x, f32.y); |
| 90 |
ures = max(u32.x, u32.y); |
| 91 |
ires = max(s32.x, s32.y); |
| 92 |
|
| 93 |
res = clamp(f32.x, f32.y, f32.z); |
| 94 |
ures = clamp(u32.x, u32.y, u32.z); |
| 95 |
ires = clamp(s32.x, s32.y, s32.z); |
| 96 |
|
| 97 |
res = mix(f32.x, f32.y, f32.z); |
| 98 |
res = step(f32.x, f32.y); |
| 99 |
res = smoothstep(f32.x, f32.y, f32.z); |
| 100 |
res = fma(f32.x, f32.y, f32.z); |
| 101 |
|
| 102 |
res = frexp(f32.x, itmp); |
| 103 |
|
| 104 |
// FrexpStruct |
| 105 |
res = ldexp(f32.x, itmp); |
| 106 |
|
| 107 |
ures = packSnorm4x8(f32); |
| 108 |
ures = packUnorm4x8(f32); |
| 109 |
ures = packSnorm2x16(f32.xy); |
| 110 |
ures = packUnorm2x16(f32.xy); |
| 111 |
ures = packHalf2x16(f32.xy); |
| 112 |
// packDouble2x32 |
| 113 |
|
| 114 |
v2 = unpackSnorm2x16(u32.x); |
| 115 |
v2 = unpackUnorm2x16(u32.x); |
| 116 |
v2 = unpackHalf2x16(u32.x); |
| 117 |
v4 = unpackSnorm4x8(u32.x); |
| 118 |
v4 = unpackUnorm4x8(u32.x); |
| 119 |
// unpackDouble2x32 |
| 120 |
|
| 121 |
s32 = findLSB(s32); |
| 122 |
s32 = findLSB(u32); |
| 123 |
s32 = findMSB(s32); |
| 124 |
s32 = findMSB(u32); |
| 125 |
|
| 126 |
// interpolateAtSample |
| 127 |
// interpolateAtOffset |
| 128 |
|
| 129 |
// NMin, NMax, NClamp |
| 130 |
} |