SPIRV-Cross/reference/shaders/desktop-only/comp/fp64.desktop.comp
2018-03-12 15:11:55 +01:00

84 lines
1.7 KiB
Plaintext

#version 450
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
struct M0
{
double v;
dvec2 b[2];
dmat2x3 c;
dmat3x2 d;
};
layout(binding = 0, std430) buffer SSBO0
{
dvec4 a;
M0 m0;
dmat4 b;
} ssbo_0;
layout(binding = 1, std430) buffer SSBO1
{
dmat4 a;
dvec4 b;
M0 m0;
} ssbo_1;
layout(binding = 2, std430) buffer SSBO2
{
double a[4];
dvec2 b[4];
} ssbo_2;
layout(binding = 3, std140) buffer SSBO3
{
double a[4];
dvec2 b[4];
} ssbo_3;
void main()
{
ssbo_0.a += dvec4(10.0lf, 20.0lf, 30.0lf, 40.0lf);
ssbo_0.a += dvec4(20.0lf);
dvec4 a = ssbo_0.a;
dmat4 amat = ssbo_0.b;
ssbo_0.a = abs(a);
ssbo_0.a = sign(a);
ssbo_0.a = floor(a);
ssbo_0.a = trunc(a);
ssbo_0.a = round(a);
ssbo_0.a = roundEven(a);
ssbo_0.a = ceil(a);
ssbo_0.a = fract(a);
ssbo_0.a = mod(a, dvec4(20.0lf));
ssbo_0.a = mod(a, a);
ssbo_0.a = min(a, a);
ssbo_0.a = max(a, a);
ssbo_0.a = clamp(a, a, a);
ssbo_0.a = mix(a, a, a);
ssbo_0.a = step(a, a);
ssbo_0.a = smoothstep(a, a, a);
bvec4 b = isnan(a);
bvec4 c = isinf(a);
double f = packDouble2x32(uvec2(10u, 40u));
uvec2 g = unpackDouble2x32(f);
double d = length(a);
d = distance(a, a);
d = dot(a, a);
dvec3 e = cross(a.xyz, a.yzw);
a = faceforward(a, a, a);
a = reflect(a, a);
dmat4 l = dmat4(amat[0] * amat[0], amat[1] * amat[1], amat[2] * amat[2], amat[3] * amat[3]);
l = outerProduct(a, a);
l = transpose(l);
double m = determinant(l);
l = inverse(l);
bvec4 k = lessThan(a, a);
k = lessThanEqual(a, a);
k = greaterThan(a, a);
k = greaterThanEqual(a, a);
ssbo_1.b.x += 1.0lf;
ssbo_2.b[0].x += 1.0lf;
ssbo_3.b[0].x += 1.0lf;
}